"Rust Interop: Memory Safety Across Foreign Function Boundaries"
summary
Describes concrete pain points from integrating Python's garbage collector with Rust via mmtk integration, showing that automated bindings often fail: bindgen mis‑handles unions and macro expansion, and build‑time generation causes inconsistencies. Explains mismatched semantics—aliasing, destructor delegation, integer conversions—and practical workarounds: prefer primitives or pointers, use containers/allocator tables for pointer stability, and document FFI safety requirements. Calls for tooling to track lifetimes across boundaries and empirical study of how unsafe code is actually used.
AI-written summary · about
chapters (13)
- 0:00Intro
- 1:12Memory Safety in Rust
- 7:08Rust Hypothesis
- 9:15Use Cases
- 10:18Technical Challenges
- 11:03Generation of bindings
- 14:02Memory model
- 16:10Data conversion
- 17:41Documentation
- 19:11Passing Data
- 19:54Passing struct
- 20:27Tracking references
- 22:11Lifetimes
related talks
35m"Memory Safety is Merely Table Stakes [...]"
01h 01mMemory Safety: Rust vs. C
01h 11mDuck-Tape Chronicles - Rust C++ Interop
21mMind the Boundary: Detecting Undefined Behavior Across Rust’s FFI
05mLightning Talk: Rust Without ‘Unsafe’ Is as Unsafe as C++
31mFrom C++ APIs to Idiomatic Rust: Wrapper Design Patterns
54mMemory Safety with Rust
58mRust for The Curious C++ Developers
