Y
Hacker News
new
|
ask
|
show
|
jobs
by
empath75
2946 days ago
rust doesn't use dynamic linking, which contributes a lot to that size.
3 comments
kingosticks
2946 days ago
Wont a crate compiled with 'crate_type = "dylib"' be dynamically linked if you specify '-C prefer-dynamic' when compiling your program?
https://doc.rust-lang.org/reference/linkage.html
link
skolemtotem
2946 days ago
This is pedantic, but rust does link dynamically, but only to libc.
link
steveklabnik
2946 days ago
It
can
, but for practical reasons, generally does not. For Rust code anyway; often anything bound via FFI is dynamically linked.
link
https://doc.rust-lang.org/reference/linkage.html