nxtquic-api
High-level async API for NxtQuic.
nxtquic-api is the ergonomic async/await layer of the NxtQuic workspace. It wraps the I/O-free nxtquic-proto state machine and the nxtquic-udp socket layer into a beautiful, Tokio-compatible API with familiar AsyncRead / AsyncWrite stream interfaces.
Features
Endpoint— bind a QUIC UDP endpoint as client or serverConnection— manage a single QUIC connection with full lifecycle controlSendStream/RecvStream—AsyncWrite/AsyncRead-compatible bidirectional and unidirectional streams- Unreliable datagrams — send/receive RFC 9221 datagrams through the same connection
- Tokio runtime integration — optional
tokio-runtimefeature (enabled by default) - TLS via
rustls— secure connections with zero-copy TLS session tickets
Feature flags
| Flag | Default | Description |
|---|---|---|
tokio-runtime |
✅ yes | Enable the Tokio-based async driver |
Quick Start
[]
= "0.1.2"
= { = "1", = ["full"] }
use ;
async
For the full workspace including HTTP/3, WebTransport, and simulation, use the top-level nxtquic crate.
Part of the NxtQuic workspace
| Crate | Purpose |
|---|---|
nxtquic |
Top-level re-export, async API |
nxtquic-proto |
Core state machine |
nxtquic-crypto |
Pluggable crypto backends |
nxtquic-udp |
Platform-optimized UDP I/O |
nxtquic-api |
Tokio async/await API (this crate) |
nxtquic-h3 |
HTTP/3 + QPACK |
nxtquic-sim |
Deterministic network simulator |
nxtquic-qlog |
qlog structured logging |
License
Licensed under either of MIT or Apache-2.0 at your option.