The sum size of a dynamic binary plus the dynamic libraries may be larger than one static linked binary, but whether that holds for more static binaries (2, 3, or 100s) depends on the surface area your application uses of those libraries. It's relatively common to see certain large libraries only dynamically linked, with the build going to great lengths to build certain libraries as shared objects with the executables linking them using a location-relative RPATH (using the $ORIGIN feature) to avoid the extra binary size bloat over large sets of binaries.
They are often conflated because you can't have shared dependencies with static linking, and bundling dynamically linked libraries is uncommon in FOSS Linux software. It's very common on Windows or with commercial software on Linux though.
[In case anybody is confused by your utterance, yes of course this works in Rust]
I eagerly await the results!
Here's nu, a shell in Rust:
$ ldd ~/.cargo/bin/nu
linux-vdso.so.1 (0x00007f473ba46000)
libssl.so.3 => /lib/x86_64-linux-gnu/libssl.so.3 (0x00007f47398f2000)
libcrypto.so.3 => /lib/x86_64-linux-gnu/libcrypto.so.3 (0x00007f4739200000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f473b9cd000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f4739110000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4738f1a000)
/lib64/ld-linux-x86-64.so.2 (0x00007f473ba48000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f473b9ab000)
libzstd.so.1 => /lib/x86_64-linux-gnu/libzstd.so.1 (0x00007f4738e50000)
And here's the Debian variant of ash, a shell in C: $ ldd /bin/sh
linux-vdso.so.1 (0x00007f88ae6b0000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f88ae44b000)
/lib64/ld-linux-x86-64.so.2 (0x00007f88ae6b2000)The problem of increased RAM requirements and constant rebuilds are still very real, if only slightly less big because of dynamically linking C.
Your second paragraph is either a meaningless observation on the difference between static and dynamic linking or also incorrect. Not sure what your intent was.
Also Go does produce fully static binaries on Linux and so it's at least reasonable to incorrectly guess that Rust does the same.
Definitely shouldn't be so confident though!
Mac does this, and Windows pretty much does it too. There was an attempt to do this on Linux with the Linux Standard Base, but it never really worked and they gave up years ago. So on Linux if you want a truly portable application you can pretty much only rely on the system providing very old versions of glibc.
It's hardly a fair comparison with old linux distros when osx certainly will not run anything old… remember they dropped rosetta, rosetta2, 32bit support, opengl… (list continues).
And I don't think you can expect windows xp to run binaries for windows 11 either.
So I don't understand why you think this is perfectly reasonable to expect on linux, when no other OS has ever supported it.
Care to explain?
This way you can get small binaries with readable assembly.
Only relinking, which you can make cheap for your non-release builds.
Dynamic linking needs relinking everytime you run the program!