name in Rust | name in C++ | restrictions |
String | cxxbridge::RustString | |
&str | cxxbridge::RustStr | |
CxxString | std::string | cannot be passed by value |
Box<T> | cxxbridge::RustBox<T> | cannot hold opaque C++ type |
UniquePtr<T> | std::unique_ptr<T> | cannot hold opaque Rust type |
| | |
The C++ API of the `cxxbridge` namespace is defined by the *include/cxxbridge.h*
file in this repo. You will need to include this header in your C++ code when
working with those types.
The following types are intended to be supported "soon" but are just not
implemented yet. I don't expect any of these to be hard to make work but it's a
matter of designing a nice API for each in its non-native language.