this post was submitted on 10 Jun 2026
5 points (100.0% liked)
Rust
8057 readers
49 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Now, that's just funny. But hey, you're using
-Osto keep that binary size low ๐And what's with the global allocator being initialized in a module? (didn't/don't know if that even works)
If you want to do things really minimally, check out the
rustixcrate which wraps syscalls directly.Otherwise, and if loading huge shared libraries is fine, then you might as well not go
nostdat all, since you can just pass-C prefer-dynamicfor that elusive magically-small std-using binary ๐good catch!
rustix - take a look, thx.
no_std was my deliberate choice.
-C prefer-dynamic- it feels that it may be a more fragile option and add some hassles with cross compiling - something likeerror while loading shared libraries: ...so I have to provide libstd.so as well together with binary to rpi .. where is the gain?