"Safety Goggles for Alchemists"
summary
Describes a compiler-backed implementation that checks when one type can be safely reinterpreted as another, implemented as the TransmuteFrom trait (available on nightly) and an assume parameter to opt into checked dynamic guarantees; demonstrates zero-copy UDP header parsing and claims real-world nets stacks that used zerocopy saved copies and cut assembly to a quarter; reveals TryTransmuteFrom for auto-generated runtime checks and estimates reducing zerocopy’s 14,000 lines of unsafe proofs to about 1,400.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 1:54Zero-copy parsing with transmute
- 3:06Safe transmute crates
- 6:32SAFE transmute theory
- 10:02TransmuteFrom trait
- 11:11Safer transmutes with assume
- 13:08Reducing unsafe in zerocopy
- 14:16Dynamically sized types
- 15:02Automatic dynamic checks
- 16:11Portability challenges
- 16:55Call to action & Q&A
related talks
36mThe language that isn't
15mNon-binary Rust: Between Safe and Unsafe
42mWhat If We Pretended Unsafe Code Was Nice, And Then It Was?
01h 01mVal: A Safe Language to Interoperate with C++
01h 01mEmbracing PODs Safely Until They Die
18mAliasing Limits on Translating C to Safe Rust
06mLayered Configuration and Safe Hot Reload in Rust
29mCompile-Time Social Coordination
