pin-init: Solving Address Stability in Rust
summary
Explains a concrete API that lets kernel code initialize pinned Rust values without unsafe code, demonstrating a working pin-init API used in Rust-for-Linux, showing examples that remove four unsafe blocks down to zero, and proving the approach is a zero-cost abstraction by comparing generated code to C. Covers how pin interacts with initialization and proposes pin projections (and general field projections) to safely access or mutate individual fields while preserving address stability.
AI-written summary · about
chapters (6)
- 0:00Introduction and motivation
- 2:36Address stability and pinning
- 5:01The pin initialization API
- 11:36Q&A: Pinning and traits
- 12:52Field projections
- 18:58Final discussion and Q&A
related talks
38mInitialization in Rust with pin-init
25mThe Mystery of the Pin
20mRust language evolutions for better kernel developer experience
47mRust project goals 2024: Stabilizing Rust in the Linux Kernel
31mGetting Something for Nothing
42mWhat If We Pretended Unsafe Code Was Nice, And Then It Was?
31mFrom C++ APIs to Idiomatic Rust: Wrapper Design Patterns
40mRust’s approach of getting things right
