| Crates.io | nyquest |
| lib.rs | nyquest |
| version | 0.3.0 |
| created_at | 2024-05-19 13:41:57.811531+00 |
| updated_at | 2025-08-03 14:02:36.047151+00 |
| description | truly platform-native HTTP client library |
| homepage | |
| repository | https://github.com/bdbai/nyquest |
| max_upload_size | |
| id | 1244932 |
| size | 98,757 |
A truly platform-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?
The nyquest-interface crate provides 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:
On top of the nyquest-interface crate and backend crates, the nyquest crate provides a convenient, user-friendly API for Nyquest users, including library authors and end application developers.
nyquest: The main crate that provides a user-friendly HTTP client API.nyquest-interface: The interface crate that defines the API for Nyquest backends and hosts the global default Nyquest backend.nyquest-preset: The umbralla crate of recommended Nyquest backends on various platforms.nyquest-backend-<backend>: The backend crate that implements the Nyquest interface for a specific HTTP client library or platform API. Currently, we have:
nyquest-backend-libcurl: libcurlnyquest-backend-winrt: UWP/WinRT HttpClientnyquest-backend-nsurlsession: NSURLSessionnyquest-backend-tests: The test framework for Nyquest backends going through nyquest.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.
Backend implementations and their adapter crates may have different licenses. Please refer to their respective READMEs for details.
A part of the code in this repository is derived from http-rs. Refer to their LICENSE section for details.
Subject to the backend's capability. ↩