The same program written in Rust can be magnitudes larger in binary size[1], which is a complete non-starter for many embedded projects (where a lot of C/C++ code is destined to live).
[1] https://dev.to/aakatev/executable-size-rust-go-c-and-c-1bna
The same program written in Rust can be magnitudes larger in binary size[1], which is a complete non-starter for many embedded projects (where a lot of C/C++ code is destined to live).
[1] https://dev.to/aakatev/executable-size-rust-go-c-and-c-1bna
Some of which, as you said, remove features that are needed like debugging symbols.
Without doing a single thing, though, c++ binaries are tiny compared to a rust binary. That's the difference.
To achieve small binaries with rust, one must remove nearly all the advantages of rust, including the self contained stdlib, debugging capabilities, and even runtime memory safety. What's even the point of using rust then?
[1] https://www.codeslow.com/2019/12/tiny-windows-executable-in-...
[2] https://github.com/johnthagen/min-sized-rust
[3] https://rust-embedded.github.io/book/unsorted/speed-vs-size....