At the moment Rust emits fully compiled object files and libraries for the linker to link. External libraries are simply passed to the linker (or bundled into an rlib and passed that way) but never does Rust do LTO with external libraries. There is no LTO between Rust and C at the moment, but maybe in the future there could be.
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Link rust crate outside cargo? | 5 | 1410 | September 25, 2020 | |
| Pre-RFC: Complete cdylib support in cargo | 11 | 1906 | November 17, 2018 | |
|
What is the current state of sharing a Rust lib crate between executables in a similar way to dynamic link libraries?
|
9 | 2314 | September 6, 2022 | |
| Build-time detection of linked libraries | 1 | 848 | November 15, 2022 | |
| A rust -> rust declarative ABI | 4 | 1542 | October 3, 2021 |