4 ms·
Is dynamically linking Rust's standard library officially-supported or did you have to hack around that? I know static-linking is the default but I've never loo
by brundolf 5y ago
Is dynamically linking Rust's standard library officially-supported or did you have to hack around that? I know static-linking is the default but I've never looked into doing otherwise
- steveklabnik 5y agoThe flag to dynamically link dependencies exists, and is part of the compiler's stable flags, but I'm not sure how much it's actually used, or how well it actually works.
- pabs3 5y agoHmm, an LWN comment posted on the Debian wiki claims there are ABI stability issues, but they are being worked on: https://lwn.net/Articles/797616/ https://lwn.net/Articles/797616/ https://wiki.debian.org/StaticLinking#Rust https://wiki.debian.org/StaticLinking#Rust
- steveklabnik 5y agoCorrect, the ABI is not stable. Given that they build a base system with a single rustc, that's not an immediate concern, though of course, a more stable ABI helps dynamic linking be more relevant.
- zozbot234 5y agoRust's stable ABI is the C ABI. I don't really see this changing in the foreseeable future.
- raggi 5y agoThe problem they'll have is that they don't update the whole system atomically, so the generations of different packages may be different. A distribution like Clear or Nix could probably wrangle things appropriately.
- raggi 5y agoIt works well in terms of programs working. It has similar challenges to C++ that various commonly used abstractions end up producing a lot of code on the program side regardless. It's nonetheless worthwhile, if you have enough programs and resource constraints.