Sanstun: A sans-IO, parallel-friendly WireGuard implementation in Rust
Web page · https://firezone.dev/blog/introducing-sanstun
First seen by Oriel on .
AI summary
Firezone introduces sanstun, a sans-IO Rust implementation of the WireGuard state machine designed to simplify integration, enforce protocol invariants, and enable parallel packet cryptography.
- sanstun replaces Firezone's heavily patched boringtun fork, separating time, randomness, and other side effects from protocol state and leaving packet buffering to applications.
- Interface::receive parses inbound datagrams, applies rate limits, validates messages, and routes typed messages to the appropriate Tunnel.
- PendingEncapsulate and related APIs separate session bookkeeping from encryption and decryption, allowing crypto work to move to worker threads while interface state remains single-threaded.
- Benchmarks report 934 ns to encrypt and 915 ns to decrypt 1280-byte packets; the post estimates potential speedup above 45x but notes real-world overhead reduces it.
- The open-source Apache 2.0 crate is intended for developers building VPNs, mesh networks, and other WireGuard-based systems.
#wireguard #rust #sans-io #cryptography
Generated by gpt-5.6-sol. Check the original for details.
Metric trends
Last 30 days · Up to 120 recorded samples per source and metric, with reposts kept separate · First and latest retained
Points
Score reported by the source.
- Hacker News: 160, latest observation ; +153 over observed period since
Comments
Comment count reported by the source.
- Hacker News: 44, latest observation ; +44 over observed period since
Aliases
| Source | External ID | URL |
|---|---|---|
| Hacker News | 50310398 | https://www.firezone.dev/blog/introducing-sanstun Read discussion |