33 ms·
That used to bother me with Rust as well, but frankly nowadays it's really hard to argue against it. Even in the embedded world you typically have enough flash
by simias 5y ago
That used to bother me with Rust as well, but frankly nowadays it's really hard to argue against it. Even in the embedded world you typically have enough flash these days that you're not counting a couple MBs, and as far as RAM is concerned you'd only save some memory if several binaries run simultaneously while linking to the same shared libs.
And even then it's not a sure win, because LTO can remove a lot of useless code from dependencies, so if you only use a small part of a dependency you might still be better off with static linking regardless of other factors.
It's pretty hard to justify the complexity and overhead of dynamic linking nowadays, IMO.
- pjmlp 5y agoDepends, dynamic linking is great for plugins, on the other hand I guess we have learnt that IPC is a better option for security and overall application stability.
- anderskaseorg 5y agoAlthough it used to be worse, these days a standard Rust “Hello, world!” compiles to just 277 KB on Linux with ‘cargo build --release’ and ‘strip’—5× smaller than the equivalent for Go (and there are games you can play to get it down further).
- simias 5y agoOh, that's very cool, I hadn't checked that in ages. Any idea on what Rust does better here? Better link time optimization? Or is the Go runtime just that heavier?
- colin_mccabe 5y agoRust doesn't really have a "runtime" in the same sense that Go does. For example, Rust has no GC.
- sitzkrieg 5y agonot counting MBs!? must be nice, havent developed on something with 1MB or more in years
- simias 5y agoYou work on systems with 1MB of storage that support dynamic linking? Please tell me more, that sounds pretty insane to me.