Windows 11 error screen

Microsoft is building a team dedicated to eliminating “every line of C and C++ from Microsoft by 2030,” which might touch Windows 11. While C powers the bulk of the Windows kernel and low-level components, including Windows APIs (Win32), C++ is used to build native Windows apps.

Microsoft’s love for Rust is not exactly newfound, and nobody really hates Rust for all good reasons. Rust is a programming language (not to be confused with a framework like WebView2), and it’s far more secure than C, which powers most of the native code in Windows, including its kernel.

The plan is to replace C and C++ using Rust. As delusional as this idea might sound, one of the distinguished engineers at Microsoft is actually quite confident about the company’s plans, all thanks to “AI.”

In a job listing, Galen Hunt, who has been with Microsoft for the past three decades and is currently a Distinguished Engineer, confirmed that his team has an opening for an “IC5 Principal Software Engineer.” But it’s far from a simple job listing. Windows Latest spotted some intriguing details on Microsoft’s careers and LinkedIn post.

In one of the LinkedIn posts, the company’s top-level engineer says:

[Our] goal is to eliminate every line of C and C++ from Microsoft by 2030. Our strategy is to combine AI *and* Algorithms to rewrite Microsoft’s largest codebases.”

All of that might sound delusional if you realize Windows is primarily written in C and C++, but Microsoft insists everything is possible when an engineer can use AI to write more than a million lines of code every month.

“1 engineer, 1 month, 1 million lines of code”.

A single engineer and one million lines of code every month, and you’ll have “C and C++” eliminated from Microsoft. Microsoft is actively hiring such developers who would join the company’s “eliminate C and C++ by 2030” plan as an IC5 Principal Software Engineer.

“Our North Star is “1 engineer, 1 month, 1 million lines of code,” Microsoft’s Galen Hunt wrote in a LinkedIn post spotted by Windows Latest.

Microsoft job listing

This statement follows a similar remark by Microsoft’s Satya Nadella, who previously said that up to 30% of the company’s code was written by AI, and that this likely includes Windows as well.

Microsoft says it’ll deploy AI to “modify” C and C++ code” at a large scale and achieve the target by 2030 (hopefully)

Microsoft has built a powerful “code processing infrastructure,” which likely means the company trained its AI model on C and C++ code alongside Rust. This infrastructure uses “AI Agents to make code modifications at scale.”

Microsoft is confident that its infrastructure will enable the company to evolve and translate most of the company’s largest C and C++ systems to Rust.

“Our team is part of the Future of Scalable Software Engineering group in the EngHorizons organization in Microsoft CoreAI,” a Microsoft engineer explained.

Rust is more secure than C and C++, and likely a better choice, but can we trust AI agents to “translate” the codebase?

Windows Rust

I love Rust, and rewriting parts of Windows in Rust is not a bad idea. Rust itself sounds like a better alternative than C and C++, largely due to proven security improvements, but our concern is with the AI-driven approach, not Rust.

AI should be able to translate the syntax, but it might fail at the intent of the code, and that likely explains why we’ve had Windows updates breaking basic features like Task Manager or even causing the BitLocker recovery screen.

Rust is part of Microsoft’s efforts to make Windows more secure, while WebView2 takes care of the frontend

Microsoft has been advocating for Rust over C and C++ for nearly six years, but at that point, we had no clue that the company actually planned to dump C and C++ as soon as possible.

“What separates Rust from C and C++ is its strong safety guarantees,” Microsoft argues in a blog post from 2019. “Unless explicitly opted-out of through usage of the “unsafe” keyword, Rust is completely memory safe.”

Microsoft recently made Windows APIs ready for Rust developers. There’s also a repo on GitHub called “windows-rs,” which is a Rust projection (bindings + glue) of the Windows API, so Rust code can call Win32, COM, and WinRT the same way C++ or C# would.

Microsoft also has a separate effort for Rust driver development (windows-drivers-rs on GitHub), which shows the company is exploring Rust beyond apps, too. And it turns out this whole “optimize for Rust” was not a one-off project or fancy “open-source” work, as the company is really serious about Rust.

So far, Microsoft’s attempt to replace native languages like C++, WinUI, XAML, etc, hasn’t gone well with consumers or even enterprises. In fact, Microsoft has contributed to the broader problem, where the most popular Windows apps are RAM-consuming monsters, such as Discord or the company’s own Teams.

Windows UI is gradually shifting to web-based components. It’s not just about apps, as we have React within the Start menu. Moreover, we’re now getting WebView2 inside the Notifications Center for the Calendar’s Agenda view. This means a new Edge/WebView2 instance is triggered when you open the Notifications Center.

Only time will tell how well these “agentic” programmers will translate C and C++ code to Rust or other languages across Windows and other Microsoft products.