Watch a 24-minute conference talk from RustLab that explores an innovative approach to generating ergonomic C++ APIs from existing Rust code. Learn how to combine procedural macros, Rustdoc's unstable JSON format, and Serde to create seamless integration between Rust and C++ codebases. Discover a production-tested framework that uses procedural macro attributes to generate extern "C" functions, handles data serialization across FFI interfaces, and produces both low-level bindings and high-level C++ APIs. Compare this solution with alternatives like cbindgen and cxx while understanding its performance trade-offs and benefits. Master the techniques for creating more developer-friendly API surfaces on both the Rust and C++ sides, making cross-language code integration more maintainable and efficient.
Generating Ergonomic C++ APIs Using Rustdoc, Procedural Macros, and Serde
RustLab Conference via YouTube
Overview
Syllabus
Generating ergonomic C++ APIs using Rustdoc, procedural macros, and Serde - Björn Wieczoreck
Taught by
RustLab Conference