However, we have seen *many* memory-safety crashes in the drivers to talk to network interfaces. Those really are full of security vulnerabilities. The most prominent recent one was broadcom's wifi driver having heap buffer overflows allowing remote code execution by anyone within wifi range in 2019[0].
[0]: https://www.bleepingcomputer.com/news/security/broadcom-wifi...
Is it possible to write C code that has the safety properties of Rust code which provides the same functionality? Absolutely, in theory. But will you be able to accomplish this and then guarantee this safety and have the confidence that future code changes won't break those guarantees? That becomes exceedingly more difficult to do, nevermind the extra time and effort it would take. In most cases this would be prohibitively expensive, and you'd just get on with life hoping for the best and mitigating what you can.
In my view, one of the killer features of Rust is its ability to be easily ABI-compatible with C as needed, which I see as a pragmatic feature of Rust that acknowledges the messy software reality of our world and the fact that C (or any other language) isn't just going to be "replaced" by rewriting stuff everywhere, neither anytime soon nor probably ever in totality. This lets us more readily combine the great capabilities of Rust with the enormous volumes of useful code that already exist today without resorting to dogmatic approaches of always thinking we need to rewrite the latter. The "rewrite everything in Rust" idea is fun in an academic kind of way, but in the real world economics will prevent that from happening everywhere, in a similar way that economics usually prevents you from validating and providing certain safety guarantees about your C code.
Must be an awesome language to work on.
1. the toolchain is better. (cargo ala)
2. maintenance of the software is better. (static linked binaries, easier deploys)
3. memory safety.
4. resource consumption (cpu/ram)
when I don't need 4 I use golang (most cases) because of 1, 2, and 3.
and I choose tools (all other things being equal) written in rust for the same reasons.
Mozilla decided to create Rust after years of using C/C++. Why?
Because they spent a fortune fixing the same problems over and over again, and they realized that no matter how clever their developers were, those problems were always going to arise as long as they kept using C/C++.
Not because C/C++ is inherently bad, but because is more flexible than strictly needed in some ways.
Rust was designed to prevent many classes of problems.