s2n-quic
s2n-quic
is a Rust implementation of the IETF QUIC protocol, featuring:
- a simple, easy-to-use API. See an example of an s2n-quic echo server built with just a few API calls
- high configurability using providers for granular control of functionality
- extensive automated testing, including fuzz testing, integration testing, unit testing, snapshot testing, efficiency testing, performance benchmarking, interopability testing and more
- integration with s2n-tls, AWS's simple, small, fast and secure TLS implementation, as well as rustls
- thorough compliance coverage tracking of normative language in relevant standards
- and much more, including CUBIC congestion controller support, packet pacing, Generic Segmentation Offload support, Path MTU discovery, and unique connection identifiers detached from the address
See the API documentation and examples to get started with s2n-quic
.
Installation
s2n-quic
is available on crates.io
and can be added to a project like so:
[]
= "1"
NOTE: On unix-like systems, s2n-tls
will be used as the default TLS provider and requires a C compiler to be installed.
Example
The following implements a basic echo server and client. The client connects to the server and pipes its stdin
on a stream. The server listens for new streams and pipes any data it receives back to the client. The client will then pipe all stream data to stdout
.
Server
// src/bin/server.rs
use Server;
use Error;
async
Client
// src/bin/client.rs
use ;
use ;
async
Minimum Supported Rust Version (MSRV)
s2n-quic
will maintain a rolling MSRV (minimum supported rust version) policy of at least 6 months. The current s2n-quic version is not guaranteed to build on Rust versions earlier than the MSRV.
The current MSRV is 1.56.1.
Security issue notifications
If you discover a potential security issue in s2n-quic we ask that you notify AWS Security via our vulnerability reporting page. Please do not create a public github issue.
If you package or distribute s2n-quic, or use s2n-quic as part of a large multi-user service, you may be eligible for pre-notification of future s2n-quic releases. Please contact s2n-pre-notification@amazon.com.
License
This project is licensed under the Apache-2.0 License.