Remix.run Logo
synergy20 14 hours ago

For me, Rust has a size issue, its std lib after strip is at least 3x as to libstdc++, and Rust is default to statically link to that lib! When you have a few Rust binaries, the storage space adds up quickly, not a good fit for embedded boards where storage is limited(same problems for Go, by the way).

Why can't Rust have a mode to do what c/c++/etc doing, that is, a reasonably sized standard library to link to? Yes I'm aware of 'how to minimize rust size' and 'prefer-dynamic', still comparing to c/c++, it is so much worse when storage size is a concern.

yolovoe 44 minutes ago | parent | next [-]

An increasing amount of AWS EC2 dataplane (Nitro firmware/software) is using Rust.

We hit this issue too, and our solution was to go busybox-style with binaries. One binary that then gets linked to with different names. Solved the problem for us.

robertlagrant 12 hours ago | parent | prev | next [-]

Maybe it can. Why don't you propose[0] a list of features that would fit your requirements? You never know!

[0] https://lang-team.rust-lang.org/how_to/nominate.html

synergy20 12 hours ago | parent [-]

I'm not very hopeful as it has been discussed in the past. If Rust will ever replace C++, binary size is one of its biggest weakness in my opinion.

Been safer is far from enough to replace the incumbent, you also need win in simplicity, speed, size, ecosystem,etc. Size at the moment is the most obvious problem as far as I can tell.

zozbot234 3 hours ago | parent | prev [-]

Did you try https://github.com/johnthagen/min-sized-rust ?

synergy20 3 hours ago | parent [-]

yes as mentioned,it's still too large compared to c++ when i have multiple executables