Building Bridges: C++ Interop, Foreign Function Interfaces & ABI
summary
Explains how C++ linking actually behaves and shows working tools and gotchas: uses bindgen to generate Rust bindings with static_asserts on sizes and offsets, demos cxx crate ownership patterns (unique_ptr, pinned mutability) and c_unwind for cross-language exceptions, walks the System V AMD64 calling convention detail (six regs, large-return via caller-allocated pointer), and reports that autocxx + codegen plus Bazel + cargo integration produces usable bridges when ABI assumptions are checked.
AI-written summary · about
chapters (8)
- 0:00Introduction and motivation
- 1:09Understanding ABI basics
- 4:31Platform and C ABI layers
- 7:21Interoperating via C ABI
- 8:53Calling conventions and layout
- 18:40Rust and C++ interoperability
- 25:02Advanced tools for bridging
- 40:22Q&A and conclusions
related talks
53mC++/Rust Interop: A Practical Guide to Bridging the Gap Between C++ and Rust
25mRust and C++
40m"Fine-Grained C++ Interop"
01h 02mRust/C++ Interop: Carcinization or Intelligent Design?
01h 11mDuck-Tape Chronicles - Rust C++ Interop
37mDuck-Tape Chronicles: Rust/C++ Interop
42mPanel: Rust and C++ can work together!
31mFrom C++ APIs to Idiomatic Rust: Wrapper Design Patterns
