1PodcastApp My Podcasts My Podcasts

Oxide and Friends

The Hardest Kind of Unsafe Rust

· 1h 28m

We love Rust for how much the compiler helps enforce safety. But sometimes it's up to us to uphold the complex--and often unclear--expectations of what constitutes safety on our own. Oxide colleague, Rain, joins Bryan and Adam to talk about the technical details of what it takes to impose safety on the hardest type of unsafe Rust. In addition to Bryan Cantrill and Adam Leventhal , we were joined by special guest star, Rain Paharia , Previously on Oxide and Friends: OxF s06e02 - Engineering Rigor in the LLM Age OxF s03e01 - Predictions 2023! Some of the topics we hit on, in the order that we…

Chapters

  1. Opening banter about Danish pronunciation
  2. Welcoming Rain back to the show
  3. IDDQD blog post and Doom cheat codes
  4. What the IDDQD crate does
  5. Why IDDQD needs unsafe Rust
  6. Unsafe code inside the standard library BTreeMap
  7. Rice's theorem and the compiler's limits
  8. Rules of writing unsafe Rust
  9. Origins of the blog post
  10. The Bun rewrite controversy
  11. Hardest unsafe Rust with user-authored code
  12. Reading the Rustonomicon
  13. Zero-sized types and unsafe code
  14. IterMut and distinct mutable references
  15. Fixes and performance tradeoffs
  16. How the duplicate index bug was found
  17. Property-based testing and naive implementations
  18. Panic safety in user code
  19. LLM-based adversarial review
  20. Miri, stacked borrows and tree borrows
  21. Reception of the blog post
  22. Responsibility in writing unsafe Rust

Speakers

Bryan Cantrill (host), Adam Leventhal (host), Rain Paharia

From the transcript

Is it better? Yeah, I think so. Usually what you say is say more when I say it's better. Like you don't give me... You know what it reminds me of? Do you know anyone who's Danish? Have you ever tried to... pronounce anything in Danish. So…