Sanstun is a new sans-IO Rust implementation of the WireGuard state machine. It prioritizes ease of use, security, and performance, featuring a parallel-friendly and idiomatic API. The sans-IO design separates I/O and side-effects from the core state and business logic, which includes handling elements like time and randomness.
Sans-IO components are designed for better composition and easier testing due to their lack of side-effects. This design also helps avoid issues like function coloring and integrates well with Rust's ownership rules. While the examples are in Rust, the sans-IO principles are applicable across various programming languages.
The developers previously used boringtun for their Firezone product but encountered difficulties maintaining API compatibility and implementing necessary changes. This led to the development of Sanstun, which incorporates improvements based on their experience.
Key changes include fully sans-IO time handling, which is crucial for accurate system simulation, and the removal of internal buffering. Internal buffering in boringtun led to unintuitive API requirements, additional allocations, and configuration challenges. Sanstun simplifies the interface by not buffering within the library.
✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →
One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.
One email a day. Unsubscribe in one click, any time.
Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.
▶ Play today's briefNew every morning, and the back catalogue is archived by date.
Sanstun, a new sans-IO Rust implementation of the WireGuard state machine, has been released. It is designed for ease of use, security, and performance through a parallel-friendly API, addressing limitations found in previous implementations like boringtun.