Netstack smoltcp by Kasesiki
英文|中文
A dedicated network stack for converting IP protocol traffic into Tcp/Udp streams, based on smoltcp
Under development
No runtime dependencies, high performance, easy to use
Supported
- Tcp transport
- Udp transport
Example
See examples/minimal.rs
The example demonstrates almost the complete set of function features. More functions, features, and documentation are still to be supplemented.
Features
-
No runtime dependencies, only depends on features and the smoltcp crate, uses bytes and ringbuf for data transmission
-
Implements features traits and tokio traits (optional)
-
The entire network stack is wrapped in a future, with no extra threads, driven/handled by the user
Why I made this network stack
When I used cavivie's netstack-smoltcp, I encountered unresolvable memory leak issues and functional problems. At the same time, I was also dissatisfied with its customization and specific code performance design. It has a lock design for every tcpstream, is highly bound to tokio, and also requires running an extra runtime. Out of dissatisfaction with the architecture and its current level of maintenance, I designed this framework. It has no runtime dependencies and implements data transmission through an spsc lock-free queue. It is simple and easy to understand, with no memory leaks. At the same time, I hope to create better examples and documentation for it, and I guarantee that it is purely handwritten (no AI).
Thanks
Thanks to these excellent projects, they inspired netstack-smoltcp