This document is an initial, partially reviewed draft
This table describes how various Rust/C++ interop use cases and problems are supported by major interop tooling, including the Rust compiler:
- Crubit auto-generates a wide range of supported Rust and C++ interop bindings. Glue code and customisation is in the original source code, and the build system. Currently depends on the bazel build system, but they are actively working on
cargointegration. - cxx: auto-generates supported safe Rust and C++ interop bindings. Glue code is in the original source code, customisation and recent language features are limited. Compatible with multiple build systems, including
cargo. - Zngur: auto-generates a wide range of declared Rust and C++ interop bindings, focusing on accessing Rust from C++. Glue code is in C++, as the more expressive language. Declarations and customisation are in
.zngIDL files. Compatible with multiple build systems.
Key:
⛔ No Support
🔁 In progress
◓ Basic or Partial Support
✅ Good Support
? Needs Analysis
blank Out of Scope
Footnotes
-
Rust compiler experiment, requires a Rust
UnsafeCellto wrap C++ mutable class members ↩