Crates.io | nyquest |
lib.rs | nyquest |
version | 0.0.0-alpha.1 |
source | src |
created_at | 2024-05-19 13:41:57.811531 |
updated_at | 2024-11-16 10:08:26.382887 |
description | truly native HTTP client library |
homepage | |
repository | https://github.com/bdbai/nyquest |
max_upload_size | |
id | 1244932 |
size | 24,309 |
A truly native HTTP client library for Rust.
You should ask the other way around: why shipping an entire HTTP stack with your application when you know your users already have WinHTTP/NSURLSession/libcurl/whatever HTTP client library available on their system?
Similar to the RustCrypto ecosystem, Nyquest aims to provide only an abstraction over the HTTP client operations. The actual functionality is implemented by Nyquest backends that talk to either platform APIs or third-party libraries. Even though Nyquest API interface has an async variant, it is not tied to any specific async runtime. Instead, the backends will as much as possible utilize the async mechanism or event loop provided by the system, or manage an event loop for the application. This way, end application developers can easily choose and switch among HTTP client implementations without thinking too much about the details. Library authors can also consume HTTP endpoints without worrying about which async runtime the end application uses.
By using platform native APIs, users will automatically benefit from system-managed security updates, functionality improvements, cache management, global proxy settings etc. that are tightly integrated with the operating system. 1
As an end application developer, consider Nyquest if you:
As a library author, consider Nyquest if you:
Meanwhile, you might not need Nyquest if you:
Nyquest is still at POC stage. We want to keep Nyquest itself as a greatest common divisor for all backends, therefore the API surface is subject to change along with the development of backends.
The following items are planned in MVP:
Future work may include:
Licensed under Apache License, Version 2.0 or MIT license, at your option.
Subject to the backend's capability. ↩