Lines Matching refs:Rust
1 {{#title Other build systems — Rust ♡ C++}}
8 - Link the resulting objects together with your other C++ and Rust objects.
18 CXX's Rust code generation automatically happens when the `#[cxx::bridge]`
19 procedural macro is expanded during the normal Rust compilation process, so no
45 ### Linking the C++ and Rust together
47 When linking a binary which contains mixed Rust and C++ code, you will have to
48 choose between using the Rust toolchain (`rustc`) or the C++ toolchain which you
51 Rust does not generate simple standalone `.o` files, so you can't just throw the
52 Rust-generated code into your existing C++ toolchain linker. Instead you need to
55 * Use `rustc` as the final linker. Pass any non-Rust libraries using `-L
57 your Rust code. If you need to link against C/C++ `.o` files you can use
61 `cargo` to generate a _single_ Rust `staticlib` target and pass that into your
64 * If you need to link multiple Rust subsystems, you will need to generate a
66 include multiple Rust `rlib`s. Multiple Rust `staticlib` files are likely
69 Passing Rust `rlib`s directly into your non-Rust linker is not supported (but
72 See the [Rust reference's *Linkage*][linkage] page for some general information