From C++ APIs to Idiomatic Rust: Wrapper Design Patterns
Talkat RustConf 2026 · on Wednesday, 2026-09-09· at 14:50· Room 510ac | Palais des Congrès de Montréal, Palais des Congrès de Montréal·
summary
Google presents an incremental migration recipe: use KUIT to generate raw bindings then layer a five-step interop process—scope and analyze, audit bindings, write FFI shims, design idiomatic Rust wrappers, and run differential tests—to turn unsafe C++ edges into safe Rust APIs. The talk quantifies risk (70% of severe vulnerabilities), lists five recurring friction patterns (movability, thread safety, strings, templates, lifetimes), shows concrete fixes (pinning, UnsafeCell/thread annotations, byte-slice UTF‑8 validation, boundary shims) and cites differential fuzzing as the high-value verifier.
AI-written summary · about
chapters (10)
- 0:00Introduction and motivation
- 4:48Five-step interop framework
- 6:26Core interop patterns overview
- 7:10Pattern one movability
- 13:17Pattern two concurrency
- 16:48Pattern three strings and UTF8
- 18:33Pattern four error handling
- 21:38Pattern five lifetimes
- 25:48Six principles for safe interop
- 30:32Conclusion and Q&A
related talks
41mC++ Migration Strategies
53mC++/Rust Interop: A Practical Guide to Bridging the Gap Between C++ and Rust
01h 11mDuck-Tape Chronicles - Rust C++ Interop
42mRewrite It In Rust: Can We RIIR Everything?
25mRust and C++
01h 02mRust/C++ Interop: Carcinization or Intelligent Design?
37mDuck-Tape Chronicles: Rust/C++ Interop
58mRust for The Curious C++ Developers
