Hacker News new | past | comments | ask | show | jobs | submit login

> All of those are MBs in size, compared to KBs for their C counterparts.

What difference does that make in the real world?




Sometimes a binary optimized for size is faster than one optimized for speed. (Due to cache residency)

Embedded systems frequently have flash size limitations in the megabytes or even kilobytes.


An order of magnitude difference... my ARM boards have 16 MB SPI flash. No way I am fitting more than a single rust binary on there.


No way are you fitting a normal operating system on there.

You can certainly compile rust to fit on there without any trouble though, you just have to try... the same way you have to try to compile any language in that sort of environment really. You can get to about 30kb while still keeping the standard library [1], you can get something with a fully featured web server in a few hundred kb [2].

[1] https://github.com/johnthagen/min-sized-rust

[2] https://jamesmunns.com/blog/tinyrocket/


Rust has partial-but-improving embedded support. I don't think you ever run any of these cmdline tools on a 16MB embedded system.

And that's fine. You wouldn't run most C cmdline tools on an embedded system either.


Wouldn't this be a no std situation then? I do agree with the other poster that binary sizes only matter in specific cirumstances though.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: