Building on an unsafe foundation
summary
Claims that unsafe is necessary and explains exactly how: shows real standard‑library code where Vec::push uses raw pointers and pointer arithmetic to write into uninitialized space and where capacity doubling and a single unsafe write plus a length bump must be proven correct. Explains tools used — unsafe blocks as explicit "trust me" gaps checked by contracts, invariants, types and the borrow checker — and demonstrates how a safe API is built on small, audited unsafe pieces.
AI-written summary · about
chapters (8)
- 0:00Start
- 5:52Unsafe operations in C++, 1/n
- 9:53Undefined behavior: consequences
- 12:44THE RUST HAIKU
- 13:14What dangers?
- 24:33How to write unsafe Rust
- 25:51Safe or unsafe?
- 30:23Build safe code from unsafe parts by enforcing the contract yourself
related talks
30mEnsuring Rust Safety: Strategies for Managing Unsafe Rust
15mNon-binary Rust: Between Safe and Unsafe
05mLightning Talk: Rust Without ‘Unsafe’ Is as Unsafe as C++
42mWhat If We Pretended Unsafe Code Was Nice, And Then It Was?
19mProduction Unsafe Rust
45mBuilding Safe and Secure Systems in Rust
01h 10mHow 10 open source projects manage unsafe code
28mDetecting Borrow and Provenance Bugs Across Unsafe Rust [...]
