Rust actually doesn’t have a garbage collector! The point of Rust is that memory safety is statically verified at compile time, automatically inserting allocations and frees. The bloat of Rust binaries in my experience comes from excessive code generation such as generics or macros. If you’re aware of that, though, you can avoid the more bloaty bits (such as the string formatting machinery) and compile some quite tiny binaries. For example, I was able to write a simple GameBoy Advance game that only took 2kb of ROM including the assets.
That said, C still very much has its place, but Rust can definitely do embedded.
Rust actually doesn’t have a garbage collector! The point of Rust is that memory safety is statically verified at compile time, automatically inserting allocations and frees. The bloat of Rust binaries in my experience comes from excessive code generation such as generics or macros. If you’re aware of that, though, you can avoid the more bloaty bits (such as the string formatting machinery) and compile some quite tiny binaries. For example, I was able to write a simple GameBoy Advance game that only took 2kb of ROM including the assets.
That said, C still very much has its place, but Rust can definitely do embedded.