quiche
🥧 Savoury implementation of the QUIC transport protocol and HTTP/3
A Rust library from Cloudflare that implements the QUIC and HTTP/3 protocols at a low level, giving developers fine-grained control over connections and streams for building network infrastructure.
Quiche is a Rust library from Cloudflare that implements two internet protocols: QUIC and HTTP/3. QUIC is a relatively new transport protocol designed as a faster alternative to TCP, particularly for web traffic. HTTP/3 is the version of the HTTP protocol built on top of QUIC. Together, they form the foundation of how a growing portion of modern web traffic moves across the internet.
This library operates at a low level. It handles the logic of the QUIC protocol itself, things like connection setup, packet processing, stream management, and connection state, but it does not manage sockets or event loops directly. The application using quiche is responsible for reading packets from the network, passing them into the library, and sending out whatever the library produces. This design gives developers control over how the networking I/O is done, at the cost of more setup work compared to a higher-level HTTP client library.
The README describes the API in terms of a connect/accept pattern for establishing connections, then send and recv methods for moving packets back and forth. Data within a connection is organized into streams, which can be opened, written to, and read from independently. The library also exposes hints about when to send packets, to help applications avoid sending large bursts of data all at once.
Quiche is used in production by Cloudflare's own edge network to handle HTTP/3 traffic. The README also notes that Android's DNS resolver uses quiche for DNS over HTTP/3, and that it can be integrated into the curl command-line tool. These are real-world deployments, not just examples.
The library is written in Rust and published as a crate. It is not intended as a plug-and-play HTTP client; it is a building block for developers who need fine-grained control over QUIC connections or are building network infrastructure. The README includes working code examples showing how to configure connections, process incoming packets, and read from streams.
Where it fits
- Build a custom HTTP/3 server or client in Rust with direct control over connection setup, stream handling, and packet pacing.
- Add QUIC transport support to an existing network application that needs faster, more reliable connections than TCP provides.
- Integrate HTTP/3 into a Rust-based proxy or edge component, as Cloudflare itself does in production.