Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It was popular demand because tooling was not mature. Now we want to install programs, which are written in Rust, using system package manager, thus we demand dynamic linking.

Moreover, when part of program is static and part is dynamically linked to a C library, it does not matter any more.

For embedded systems, dynamic linking is better when more than one running application is written in Rust, to save memory and processor cache.



Dynamic linking is fully supported by Rust. Just pass -C prefer-dynamic in your RUSTFLAGS.


Since the parent mentioned installing using a package manager, could it be default in that case as well as in the `cargo install` case where cargo essentially controls the binary?

If not default, could it be more easily chosen with a shorter option?

Is a rust heap/runtime packaged for distros like Debian which have packaged binaries of some crates?

Note, I'm not in favor of making dynamic default for `cargo build`.


But ABI is not fixed yet, so all libraries and binary must be compiled by same compiler with same options.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: