3 ms·
ldd just prints the things it dynamically links, which is basically just libc and related system interface libraries. You want to list then number of things it
by gpm 6y ago
ldd just prints the things it dynamically links, which is basically just libc and related system interface libraries.
You want to list then number of things it statically links. If you run cargo clean; cargo build, and check out target/debug/deps you should be able to get a list of all the statically linked rust libraries, which is a subset of all the statically linked libraries.
Also, as other people mentioned, this is including debug information and so on. Strip it if you care about size.
Rust is perfectly happy to make very small executables, you just have to ask it to.