Google Grants $1 Million To Move From C++ To Rust. Is C++ Slowly Dying?
Google Is (Early) Adopting Rust. Are You?

This LinkedIn post recently caught my eye.

As per the post, Google announced funding of $1 Million to the Rust Foundation to improve interoperability between C++ and Rust.
This is huge!
Why, you’d ask?
C++ runs the world that we see today.
It is one of the most popular programming languages used to build backend and embedded systems.
According to the TIOBE Index, a measure of the popularity of a programming language, C++ is 3rd on the list (just after Python and C).
C++ is fast, runs with minimal overhead and developers love it.
BUT, programming in C++ comes with a big issue that cannot be left unaddressed.
This issue is — Memory safety.
Are Memory Safety Issues A Big Deal?
Look at the plot from Google’s 2019 report on the vulnerabilities fixed in Android systems.
60% of these vulnerabilities come from memory issues in the code.

That’s the same with most major tech companies:
- Microsoft: ~70% of the vulnerabilities each year continue to be memory safety issues
- The Chromium Projects: 70% of the high-severity security bugs are memory unsafety problems (that is, mistakes with C/C++ pointers).
Half of those are Use-after-free bugs (when a program does not clear the pointer to that memory after it is freed).
- Mozilla: On analysis of security vulnerabilities, of the 34 critical/high bugs, 32 (94%) were memory-related.
- Google’s Project Zero: 67% of zero-day vulnerabilities for the year 2021, were memory corruption vulnerabilities
According to Ryan Levick from Microsoft Azure, in 2004, each memory-related error cost the industry about $250,000.
So, collectively these memory bugs in the C/C++ code costs the tech industry millions of dollars!
Besides the financial costs, malicious actors on the internet exploit these bugs and use them in the commission of attacks against real people.
So yes, this affects the non-programmers at a deeper level than they realise, too.
But Can’t We Fix C/ C++?
A lot of effort has been previously put in to minimise memory-related bugs in C/C++ code.
These include:
- Sanitizers such as AddressSanitizer, LeakSanitizer and UndefinedBehaviorSanitizer
- Static analysis tools such as Clang Static Analyzer, Coverity, Cppcheck
- Modern C++ compilers (e.g., GCC, Clang, MSVC) with improved compiler warnings
- Modern C++ features such as Smart Pointers and Move Semantics
- Safe Libraries (
std::vectorinstead of raw arrays) - Improved memory allocators (e.g. Scudo Hardened Allocator)
- Rigorous code reviews and teams following best practice rules for writing safe and efficient C++ code
But, honestly, none of them have worked well and programmer (human) errors still cause major memory bugs in critical codebases.
Rust To The Rescue
1. Memory Safety Without Garbage Collection
Rust, introduced as a modern systems programming language, introduces Type safety and Thread Safety at compile time.
Unlike C/C++, Rust prevents memory bugs (such as Dangling pointers) through its ownership model without needing a garbage collector.
Eliminating the garbage collector also removes the runtime overhead and makes Rust super fast!
With an ultra-pedantic compiler, Rust won’t let you compile code that violates safety and memory management rules. This drastically reduces the bugs that manifest at run time.
Want a real-world example?
The Authorisation service at npm was recently re-written in Rust and the results? — npm’s first Rust program has caused 0 alerts in its year and a half in production.
Things are so lucrative that Microsoft Azure’s CTO has advised to halt starting any new projects in C/C++!






