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? | 6 | 1370 | December 22, 2024 | |
| Pre-RFC: Complete cdylib support in cargo | 12 | 1844 | March 25, 2019 | |
|
What is the current state of sharing a Rust lib crate between executables in a similar way to dynamic link libraries?
|
10 | 2177 | December 5, 2022 | |
| Build-time detection of linked libraries | 2 | 840 | December 22, 2024 | |
| A rust -> rust declarative ABI | 5 | 1513 | January 1, 2022 |