A library implementing popular networking transport protocols in user space with Rust.
- Correct, and comprehensive - The primary goal is create a network stack that works. Rusts
world-class type system is used at every opportunity to properly capture the constraints of the
network stack detailed in the IETF RFCs. From the link layer to the transport layer, the
following transport protocols shall be supported:
- UDP
- TCP
- QUIC
- Familiar, but
async- Rust already has networking primitives for TCP/UDP. That familiar API is reproduced here, but with non-blocking primitives similar to the API in Tokio. These primitives are intended for use with the Tygress I/O driver multiplexing network traffic between aNetDevto a collection of sockets. - Safe, but zero-copy - Some use of the the
unsafekeyword is necessary to provide a type-safe zero-copy API. Usage ofunsafeis cordoned off to a small, well documented section of the library, while the rest is written in safe Rust. - No dependencies, and
no_std- A network stack all in one place using only the core components of the Rust standard library. Implement theNetDevtrait for your own network device capable of receiving/transmitting Ethernet frames and BYOB (Bring Your Own Buffers) for the sockets. Those running Unix/BSD may opt-in to some providedNetDevimplementations.
- Jon Gjengset - Where this project all started.
smoltcp- Used heavily as a reference throughout the project.tokio- Ideas forasyncnetworking primitives.embassy- Ideas for ano_stdexecutor.zerocopy- Ideas for zero-copy type-safe headers.