Get the latest tech news

Sans-IO: The secret to effective Rust for network services


sans-IO: The secret to effective Rust for network services

Most parts of our Rust stack aren't particularly surprising: We use the tokio runtime for asynchronous tasks, tungstenite for WebSockets, boringtun for the WireGuard implementation, rustls to encrypt traffic with the API, etc. This also makes maintenance easier for library authors: They can focus on correctly implementing protocol functionality instead of having debates around async runtimes or exposing APIs to set socket options. It appears that with either of these options, we arrive at a design that feels brittle, is prone to deadlocks and no longer employs zero-cost abstractions, yet avoiding all of these is one of the reasons we wanted to use Rust in the first place!

Get the Android app

Or read this on Hacker News

Read more on:

Photo of secret

secret

Photo of sans

sans

Photo of effective Rust

effective Rust

Related news:

News photo

📱 iPhone 1 turns 17 today, 🍟 I tried all McDonald's $5 Meal Deals, 🤫 Secret canceled Xbox & Surface Phone, 😱 Robots with human faces

News photo

Sans Bullshit Sans (2015)

News photo

Unlocking the Secret of Social Media Algorithms