netstack.fm

zerocopy with Joshua Liebow-Feeser

17 snips
Oct 21, 2025
Joshua Liebow-Feeser, a software engineer at Google and the visionary behind the zerocopy Rust crate, shares his journey from software development to creating high-performance systems. He dives into the origins of Fuchsia, the benefits of zero-copy memory manipulation, and how Rust enhances safety in networking stacks. Joshua elaborates on the design philosophy of NetStack 3, emphasizing type safety and correctness. He also discusses the challenges of variable-length data and the importance of formal verification in building robust software.
Ask episode
AI Snips
Chapters
Transcript
Episode notes
INSIGHT

Zero-Copy Means Typed Views, Not Moving Bytes

  • Zero-copy parsing reinterprets existing buffers as typed references to avoid heap allocations and repeated copies.
  • The technique is subtle in Rust and needs runtime size/alignment checks plus trait proofs for safety.
ADVICE

Prove Layout With Traits And Derives

  • Use trait bounds to prove structural properties of types before converting bytes to typed references.
  • Derive macros automate those proofs so runtime helpers can safely transmute slices into typed views.
INSIGHT

When Zero-Copy Hits Variable-Length Limits

  • Variable-length and TLV-style fields don't map to native Rust types, so zero-copy can't parse them end-to-end.
  • NetStack uses a separate packet crate with iterators and helpers to handle repeated/variable records atop zero-copy.
Get the Snipd Podcast app to discover more snips from this episode
Get the app