Re:Making Rust binaries smaller by default
by 0x000xca0xfe on Wednesday January 24, 2024 @08:12AM
(#39116855)
We are shipping a full blown custom Linux distribution, embedded software is more than just microcontrollers. Binary size is still just as relevant.
Re:Making Rust binaries smaller by default
by LoganDark on Wednesday January 24, 2024 @08:14AM
(#39116873)
Are you confusing "embedded" for "microcontrollers without an operating system"? Because there are plenty of embedded CPUs that can run Linux. Buildroot even exists to make it easier to create distributions for these types of devices. For example, I would consider the reMarkable 2 to be an embedded device, but it runs full-blown Linux (to the point of having a bloated Qt stack).
That's probably an extreme case though, as nobody in their right mind would actually try to run Qt on an embedded device with any reasonable limit on resources. I'm sure rM only does it because they can afford to be wasteful - they have hundreds of megabytes of space for the operating system, and all the latency-sensitive stuff is definitely not built on Qt.
But embedded Rust usually does not use stdlib. This thread started with:
> It's really a shame that Rust includes the stdlib piecemeal in binary form, debug symbols and all, in every final binary.
Which is not case for embedded.