AUTO-UPDATED

Sanstun: A sans-IO, parallel-friendly WireGuard implementation in Rust

Firezone has released sanstun, a new sans-IO Rust implementation of the WireGuard state machine designed to improve performance and security through a parallel-friendly, idiomatic API.

Key Points

  • sanstun separates IO and side effects from business logic, allowing for easier testing and better integration with Rust's ownership rules.
  • The library removes internal buffering to simplify the interface and eliminate unnecessary memory allocations found in previous implementations.
  • A core feature is the separation of bookkeeping from encryption, enabling developers to offload cryptographic operations to worker threads for higher throughput.
  • The API enforces security invariants at compile-time, such as mandatory rate-limiting for incoming packets via the Interface::receive function.
  • sanstun is available on crates.io and is released as open-source software under the Apache 2.0 license.

Why it Matters

By decoupling state management from heavy cryptographic tasks, sanstun allows developers to scale WireGuard performance across multiple CPU cores without complex locking mechanisms. This modular design provides a more flexible and robust foundation for building VPNs, mesh networks, and other secure communication tools.
Firezone.dev Published by Thomas Eizinger
Read original