Lines Matching full:cxx
1 CXX — safe FFI between Rust and C++
4 …o/badge/github-dtolnay/cxx-8da0cb?style=for-the-badge&labelColor=555555&logo=github" height="20">]…
5 …ps://img.shields.io/crates/v/cxx.svg?style=for-the-badge&color=fc8d62&logo=rust" height="20">](htt…
6 …mg.shields.io/badge/docs.rs-cxx-66c2a5?style=for-the-badge&labelColor=555555&logo=docs.rs" height=…
7 …ctions/workflow/status/dtolnay/cxx/ci.yml?branch=master&style=for-the-badge" height="20">](https:/…
21 cxx = "1.0"
24 cxx-build = "1.0"
28 *[Release notes](https://github.com/dtolnay/cxx/releases)*
34 Please see **<https://cxx.rs>** for a tutorial, reference material, and example
43 this, CXX receives a complete picture of the boundary to perform static analyses
47 If everything checks out statically, then CXX uses a pair of code generators to
62 CXX guarantees an ABI-compatible signature that both sides understand, based on
83 #[cxx::bridge]
130 To look at the code generated in both languages for the example by the CXX code
150 The definition written within cxx::bridge is the single source of truth.
161 Within the `extern "Rust"` part of the CXX bridge we list the types and
163 the `super` module, the parent module of the CXX bridge. You can think of the
176 to be defined as `extern "C"` ABI or no\_mangle. CXX will put in the right shims
183 Notice that with CXX there is repetition of all the function signatures: they
185 again inside the cxx::bridge module, though compile-time assertions guarantee
193 This is because CXX fills a somewhat different role. It is a lower level tool
197 bindgen-like tool on top of CXX which consumes a C++ header and/or Rust module
198 (and/or IDL like Thrift) as source of truth and generates the cxx::bridge,
200 guarantees of CXX.
202 But note in other ways CXX is higher level than the bindgens, with rich support
209 By using a CXX bridge as the shared understanding between the languages, rather
213 It would also be reasonable to mix and match, using CXX bridge for the 95% of
215 the old fashioned way with bindgen and cbindgen, if for some reason CXX's static
225 CXX's C++ code generator and compiles the resulting C++ code along with any
238 cxx-build = "1.0"
260 For use in non-Cargo builds like Bazel or Buck, CXX provides an alternate way of
281 practice to use CXX bridge effectively as it won't work in all the ways that you
290 language. With CXX we achieve that visibility and know what's on the other
301 ([rust-lang/rust-bindgen#778]). CXX knows about this and can insert the
327 <tr><td><a href="https://docs.rs/cxx/1.0/cxx/struct.CxxString.html">CxxString</a></td><td>std::stri…
329 <tr><td><a href="https://docs.rs/cxx/1.0/cxx/struct.UniquePtr.html">UniquePtr<T></a></td><td>…
330 <tr><td><a href="https://docs.rs/cxx/1.0/cxx/struct.SharedPtr.html">SharedPtr<T></a></td><td>…
333 <tr><td><a href="https://docs.rs/cxx/1.0/cxx/struct.CxxVector.html">CxxVector<T></a></td><td>…
339 The C++ API of the `rust` namespace is defined by the *include/cxx.h* file in
361 This is still early days for CXX; I am releasing it as a minimum viable product