Self-Directed Research

sans-io: meh

Jun 11, 2025
Dive into the intriguing world of 'sans-io' as James and Amos dissect its impact on Rust programming. They tackle challenges in async programming, sharing personal anecdotes and technical critiques. The debate on file formats, including Sans.io and the relevance of async I/O systems, highlights the quest for better protocol designs. Memory management complexities come under scrutiny, emphasizing stack versus heap allocation strategies. The conversation also explores the limitations of the Tokyo Rust LS, questioning its handling of TCP sockets and control events.
Ask episode
AI Snips
Chapters
Transcript
Episode notes
INSIGHT

Async Eases Protocol State Machines

  • Sans-IO separates protocol logic from IO but forces manual state machines which can be clunky in Rust.
  • Async/await automates state machines, making protocol code clearer and easier to write with hierarchical state handling.
ANECDOTE

Sans-IO in Zip File Parser

  • Amos maintains rczip, a sans-io implementation of zip, supporting complex state transitions.
  • He highlights sans-io fits well for file formats and static but sequentially complex protocols.
INSIGHT

Async Traits Lag Modern IO

  • Current async read traits in Rust don't support efficient modern IO primitives like IO_uring.
  • Sans-IO can offer more flexible, efficient buffer ownership management outside async traits.
Get the Snipd Podcast app to discover more snips from this episode
Get the app