DEV Community

loading...

Discussion on: Executable Size: Rust, Go, C, and C++

Collapse
aghost7 profile image
Jonathan Boudreau

Rust supports different compilation profiles targeted at embedded development. You can read more about it here: docs.rust-embedded.org/book/unsort...

If binary size is a concern, you can reduce it further with rustc -C opt-level=s -C target-feature=+crt-static main.rs.

Collapse
aakatev profile image
Artem Author

That's good to know. Next time, I will make a comparison with different levels of optimization for all the languages.
In this post, I was looking at static linking with no debugging option for all of them.