Hacker News new | ask | show | jobs
by ahartmetz 261 days ago
Linking? There are two relatively simple improvements: using a faster linker and not using static helper libraries (dependency crates...) in debug builds. I understand that Rust has basically no useful support for deploying shared libraries, but they could still be useful to get faster debug builds. Well, I've never tried it, but it works well in C++. Dynamically linked binaries typically take a few milliseconds longer to start, but also take seconds less to link.
1 comments

> I understand that Rust has basically no useful support for deploying shared libraries

Rust has excellent support for shared libraries. Historically they have involved downcasting to C types using the C ABI, but now there are more options like:

https://lib.rs/crates/stabby

https://lib.rs/crates/abi_stable

and https://github.com/rust-lang/rfcs/pull/3470