Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
Programming Microsoft

Microsoft To Replace All C/C++ Code With Rust By 2030 (thurrott.com) 271

Microsoft plans to eliminate all C and C++ code across its major codebases by 2030, replacing it with Rust using AI-assisted, large-scale refactoring. "My goal is to eliminate every line of C and C++ from Microsoft by 2030," Microsoft Distinguished Engineer Galen Hunt writes in a post on LinkedIn. "Our strategy is to combine AI and Algorithms to rewrite Microsoft's largest codebases. Our North Star is '1 engineer, 1 month, 1 million lines of code.' To accomplish this previously unimaginable task, we've built a powerful code processing infrastructure. Our algorithmic infrastructure creates a scalable graph over source code at scale. Our AI processing infrastructure then enables us to apply AI agents, guided by algorithms, to make code modifications at scale. The core of this infrastructure is already operating at scale on problems such as code understanding."

Hunt says he's looking to hire a Principal Software Engineer to help with this effort. "The purpose of this Principal Software Engineer role is to help us evolve and augment our infrastructure to enable translating Microsoft's largest C and C++ systems to Rust," writes Hunt. "A critical requirement for this role is experience building production quality systems-level code in Rust -- preferably at least 3 years of experience writing systems-level code in Rust. Compiler, database, or OS implementation experience is highly desired. While compiler implementation experience is not required to apply, the willingness to acquire that experience in our team is required."

Microsoft To Replace All C/C++ Code With Rust By 2030

Comments Filter:
  • by fpp ( 614761 ) on Monday December 22, 2025 @08:10PM (#65876245)
    I'm not a software guy, and even I know this has a very high probability of failing miserably.
    • by jd ( 1658 ) <[imipak] [at] [yahoo.com]> on Monday December 22, 2025 @08:16PM (#65876275) Homepage Journal

      On the other hand, Microsoft trying to write an OS in Rust will reveal absolutely every defect present in the language.

      Unless they write their own, which is quite likely as they'd rather have defects they can ignore.

      • by gweihir ( 88907 ) on Monday December 22, 2025 @09:30PM (#65876431)

        Not really. My guess is they will not really make their way out of "unsafe" and hence win absolutely nothing in that rewrite. And C++? I am not even sure you can port that to Rust without essentially writing a compiler that adds all the missing OO features. Rust has limited and very non-standard OO. Which makes sense given its aims, but not when you come from C++.

        • Re: (Score:3, Insightful)

          by phantomfive ( 622387 )
          If a software engineer can suprivise 1 million lines of code being written a month, then there is no job for software engineers anymore. A single person can't verify that much code in a month, so writing code would no longer be an important skill.

          The difficulty here isn't the Rust (since literally anything can be rewritten in Rust with more or less difficulty); the difficulty here is the Ai.
      • by SpinyNorman ( 33776 ) on Tuesday December 23, 2025 @08:59AM (#65877169)

        Not just Windows - I'm sure a lot of Office is also old enough to have been coded in C++, and apparently parts of Azure as well.

        This is going to be one of the most epic rewrite failures of the software industry, even if the result is only a massive waste of resources rather than actually doing material harm to Microsoft.

        This is a chance for anyone applying for the Principal engineer position to get their name in the history books, but not in a good way.

      • My guess is that they will attempt to take over Rust, turning it from a community run project to a Microsoft run project.
    • by XanderLord ( 5086593 ) on Monday December 22, 2025 @08:18PM (#65876279)
      I am a Software guy, and can confirm that so much will go wrong.
    • Everything is going to go wrong.

      • by fahrbot-bot ( 874524 ) on Monday December 22, 2025 @09:01PM (#65876361)

        Everything is going to go wrong.

        Their top guy Murphy [wikipedia.org] is heading up the re-write. :-)

    • by LindleyF ( 9395567 ) on Monday December 22, 2025 @09:31PM (#65876435)
      I've done migrations. Not on this scale, but big. The problem isn't the 1-to-1 stuff; the problem is all the edge cases. All the stuff that only worked because it made bad assumptions that happened to work out in context. This is going to expose a lot of bugs, and that's good, but fixing those bugs will in some cases be a huge problem.
      • Re: (Score:2, Interesting)

        Supposedly this is what came of their effort to rewrite the font renderer in Rust, which was apparently a resounding success. Which makes sense, because historically, font rendering is a major pain point. Shit, just a few months ago iOS fell victim to a font exploit, and a year before that there was another major iOS exploit that again involved a font bug as part of the kill chain. Earlier this year, a vulnerability in FreeType on Linux was being actively exploited.

        • by tlhIngan ( 30335 ) <slashdot@NoSpaM.worf.net> on Tuesday December 23, 2025 @10:14AM (#65877319)

          Supposedly this is what came of their effort to rewrite the font renderer in Rust, which was apparently a resounding success. Which makes sense, because historically, font rendering is a major pain point. Shit, just a few months ago iOS fell victim to a font exploit, and a year before that there was another major iOS exploit that again involved a font bug as part of the kill chain. Earlier this year, a vulnerability in FreeType on Linux was being actively exploited.

          Fonts are not simple outlines of letters - they're actually little programs that take arrays of vertices and depending on the arrangement of letters, the position of those vertices can change.

          The problem with this is now you have a little VM to run the myriad of little programs contained to adjust the vertices and have to keep things separate.

          For Latin alphabets these programs don't do very much - usually just adjusting the leading and kerning to make the text look good on screen. This also includes spacing characters out to handle ligatures like "fl" and such. In the old days when type was physical, the letter blocks would contain such things that the person arranging the blocks would use.

          For non-Latin alphabets, like Arabic, these programs are even more important because often the letter shapes depend not only on the characters that appear before and after, but often o the entire word. Many problems arise because if you have a limited space to display a word, you can't just chop a word in the middle as that can change the meaning of the word entirely.

    • by sound+vision ( 884283 ) on Monday December 22, 2025 @11:20PM (#65876591) Journal

      Given the features being added to Windows lately, I think failing to run is the best possible outcome.

    • by Kisai ( 213879 )

      Oh it absolutely will. Remember Microsoft was also the guys going "There was no need to throw away Netscape to write a new browser (Mozilla)" while they hung on to MSIE for 20 years.

      My prediction goes two ways:
      a) They replace all the userland side of the OS with Rust and that shitty UI framework they've been using since Windows 8.
      b) They start trying to write drivers and kernel-space with Rust and they hit massive performance bottlenecks and then the project dies.

      The reason you use C, is for performance. Pe

      • Small correction. C++ with template metaprograms can be more performant than C code, due to the ability to better map code against the system architecture. The C design is beautiful, but the use of general purpose library functions can hold it back in some applications.
  • They are going to do this in an automated way, meaning the bugs will be copied too as "features".

    • by bjoast ( 1310293 )
      Let's hope so. In old code bases you can't always just fix every bug because many bugs have through use and abuse evolved to be considered part of the contract. An AI assisted rewrite that did not migrate known bugs would likely be a grand failure.
  • A long time ago, in a galaxy far far away, we used an EDA tool whose much touted release 9 was long delayed and when it arrived was buggier than an insectarium on steroids.

    Some years later I met the team lead of that release. It was because management had mandated a complete rewrite into C++. I also learned that the CFO loved that release because revenue from maintenance contracts went up. For years.

    I will watch Microsoft's future progress with considerable interest.

    • by gweihir ( 88907 )

      This is were "if it is not broken, do not fix it" comes from. Although, to be fair, MS code is pretty broken. AI use will just make that worse.

      I guess they could jettison their steaming pile and hire all the Wine devs for a "rewrite", but I doubt they have the vision or insight for that.

  • Sounds great (Score:5, Insightful)

    by OrangeTide ( 124937 ) on Monday December 22, 2025 @08:24PM (#65876297) Homepage Journal

    Rust is incredibly powerful. And it makes a lot of sense for software companies to embrace it. On the other hand, any projects that aren't actively maintained will bitrot very quickly. Rust gets a new stable release every 6 weeks, and deprecating features that aren't working out or are superseded is a normal part of the process.

    In comparison, I could pick some ISO/ANSI release of C and have it supported by native tools for decades. Picking C89 or C99 as a baseline, nearly every C compiler supports it now. Aiming for C11 or C17 for better 64-bit and Unicode support still gives you the possibility to support your application on a wide range of toolchains and runtimes. It is entirely possible that C isn't sufficient for your project, at least bare bones ISO C. You're often on the hook to maintain your own platform specific extensions. These might be pretty small for a command-line utility or back-end service like a relational database. Or platform specific libraries may be a huge pain in the neck like in game development.

    • by piojo ( 995934 )

      Can you clarify about released features being deprecated? I've read rust RFCs and they're always going on about how some feature is unstable (and in Nightly rust only) because it's not finalized and they can't change it after it's marked stable. AFAIK if you use Rust 2024, you will always be able to compile as Rust 2024.

      I like the nightly features, but they're usually to save a few lines of code or not need to write an extra helper function. Nightly features aren't need for serious software or libraries.

      • The Rust standard library (std) currently guarantees multiple compilers in the same application so crates buildable on stable will always be buildable. Therefor std can't really fully deprecate API.

        If Rust 1 (there will be no "2") then any bit of Rust code for stable should still build in the future. It has been demonstrated before that a program built against rust 1.0.0 can still be built. But what is left out that "experiment" is that team will all move to a newer version of Rust rather than keep multiple

    • Re:Sounds great (Score:5, Insightful)

      by Anne Thwacks ( 531696 ) on Tuesday December 23, 2025 @02:12AM (#65876755)
      Rust gets a new stable release every 6 weeks,

      In my world, that is the definition of unstable

      • Rust gets a new stable release every 6 weeks,

        In my world, that is the definition of unstable

        Seriously? Yeah, that’s about as stable as a crack addict working payroll.

        Microsoft LTSC release schedules look like religious scripture by comparison.

  • by Tschaine ( 10502969 ) on Monday December 22, 2025 @08:24PM (#65876299)

    I worked at Microsoft for over a decade, and only had one bad performance review. That was after a partner team decided not to support the feature that my feature depended on. Since my feature didn't ship, and since somebody had to be at the bottom of the stack rack, I was my manager's logical choice. He got burned too, for he same reason.

    (At the time, I just thought "welp, I guess it be that way" but I'm hindsight it pisses me off the more I think about it. I busted my ass to hold up my end of the project, and was ready to go until the other team pulled the rug out from under us. My manager left MS a couple months later, and I probably should have too. But I did make senior a couple years later, so no real harm done.)

    Anyway....

    If AI is fundamentally not good enough to convert a million lines of code per dev, the principal engineer they're about to hire is going to be the logical choice for their manager's bottom-of-the-stack.

    That's a high risk. AI is not what executives think it is.

    • by gweihir ( 88907 )

      That's a high risk. AI is not what executives think it is.

      Indeed. But this job is actually low risk as in low-uncertainty. You are assured to fail, no chance in hell for this to go differently.

  • by battingly ( 5065477 ) on Monday December 22, 2025 @08:25PM (#65876301)

    Take a large code base that works fine now, with the occasional memory overrun, and make massive changes to it. "Works fine" will become a distant memory.

    • by znrt ( 2424692 )

      hey, but this is scalable algorithmics at scale!

      Our algorithmic infrastructure creates a scalable graph over source code at scale.

    • Joel still very much relevant:
      https://www.joelonsoftware.com... [joelonsoftware.com]

      • Yep, first thing I thought of was Joel's diatribe against rewriting your codebase from scratch.

        • As I mentioned earlier, Microsoft started going all in on Rust after rewriting their font renderer (a major source of bugs on basically every OS) in it turned out to be quite successful.

        • I reference Joel's article a lot. If the goal is essentially compiling the C/C++ code to Rust and staying bug-for-bug compatible (except for the bugs they really want to correct such as buffer overflows) it might be feasible. Most of Windows is likely single-threaded code (with locks here and there to protect potentially shared state) and this probably can translate cleanly (e.g. the code for rendering a font is likely just basic procedural code - they need to guarantee that the font object is immutable dur

    • Surely, nothing that another lot of updated licence agreements can't cover.

      Works 99.9% of the time.

    • by gweihir ( 88907 )

      Works fine? No. Works somewhat under good conditions? More like it.

      On the other hand, MS has now failed numerous times to implement "WinFS", so maybe they will just end up wasting vast amounts of money with no results.

    • But at least it will be a distant memory-safe
    • Take a large code base that works fine now, with the occasional memory overrun, and make massive changes to it. "Works fine" will become a distant memory.

      There are two reasons why the 1980s thought process of "change your passwords frequently" is no longer advised:

      1} Users will revolt and end up doing stuff like "password1", "password2", or writing it on a sticky note.
      2} If a password is compromised, it should be changed immediately, not in 90 days, and if it's not compromised it shouldn't be changed, because of #1.

      Rewriting the entire codebase when the vast, vast, vast majority of it has an insane number of people-hours testing it and vetting it is ins

      • NIST SP 800-63 has formalized this. Specifically, look up Section 3.1.1.2 in SP 800-63B-4, released just this year. Minimum length 15, max length at least 64, but no other requirements, including complexity or regular rotation. Unicode is supposed to be accepted, normalized against a standard process (that one I don't remember, but it's documented), with one code point counting as one character. Filtering for known bad passwords or patterns is strongly encouraged.

        I pushed through an implementation at our co

        • Dealt with NIST mandates for years. My users accepted it a lot better when we had a passphrase day. The day we make up a crazy passphrase they can easily remember. Do it over breakfast or a pizza lunch. Everyone appreciates it and it turns it into a fun thing to do every few months.

          New NIST standards tend to hint at passphrases anyway. Might as well make it a little easier.

      • Take a large code base that works fine now, with the occasional memory overrun, and make massive changes to it. "Works fine" will become a distant memory.

        There are two reasons why the 1980s thought process of "change your passwords frequently" is no longer advised: 1} Users will revolt and end up doing stuff like "password1", "password2", or writing it on a sticky note. 2} If a password is compromised, it should be changed immediately, not in 90 days, and if it's not compromised it shouldn't be changed, because of #1. Rewriting the entire codebase when the vast, vast, vast majority of it has an insane number of people-hours testing it and vetting it is insane. This has got to be a marketing ploy so they can say "we re-wrote every product you use using our AI, so you should give us lots of money and use our AI for everything!"

        Passwords, are dead thinking. Pass-phrases are much easier to convey, much less likely to be compromised, and enable less frequent changes. Otherwise, you’re doing a lot of assuming and babysitting to ensure Password1 hasn't been compromised. Because it sure as shit won’t get changed unless you force it.

    • > "Works fine" will become a distant memory.
      "Distant memory" goes back to MS-DOS 2.11....
  • Aim for the stars, be happy with the moom, but don't be surprised if you get lost in space.

    Okay, I added that last bit, but it seems so appropriate here.

  • I was going to post "If it ain't broke, don't fix it." but this is microsoft we're talking about. Their codebase is pretty broken already, so, let them have at it. I'll watch the chaos with firefox on linux. I just hope my bank and the financial markets don't crash too hard if it gets that bad.There's a lot of dependence on MS products.
  • by Gavino ( 560149 ) on Monday December 22, 2025 @08:50PM (#65876343)
    So it's only natural that Microsoft embraces the both of them. Maybe they can put the code "on the blockchain" while they are at it *laughing emoji*. Oh sorry that's so 2021

    But taking my cynical hat off, it's not the worst idea I've heard. Zuck's "metaverse" and Tim Cook's iCar have been far worse IMHO. This could actually result in something useful. A lot of Windows code could probably do with a refactoring, and be made less x86 dependant. I think this will have positive flow-on effects for Open Source. With M$ committing 100% to Rust, it means that it will become a must-know language to learn for new grads. This will increase the Rust talent pool across the board, and a lot more people contributing with Rust to open-source projects like the Linux kernel, which I think long-term is a good thing.
  • ... and 1 million bugs. If I worked at MS now, I'd be looking for a new gig last week.
    • by kmoser ( 1469707 )
      Why? There's sure to be plenty of work fixing the inevitable bugs this project generates.
  • hiring, huh (Score:4, Insightful)

    by Deadbolt ( 102078 ) on Monday December 22, 2025 @09:02PM (#65876363)

    "Hunt says he's looking to hire a Principal Software Engineer to help with this effort."

    if there's one thing my career is lacking, it's working for a "distinguished engineer" who can say with a straight face that he plans to port 30+ years of source code from an unsafe to a safe language using fairy dust and slop generators

    • by gweihir ( 88907 )

      To be fair, you can probably cross-compile C to Rust, if you make the target "unsafe" and disregard performance.

      C++? I do not think so. Rust has a very non-standard and limited OO model. Good for systems coding, not good for porting C++ to it.

      • by dskoll ( 99328 )

        Well, you can (or used to be able to) translate C++ to C, and presumably go from there to Rust, but the resulting code will basically be non-human-modifiable.

        • by kmoser ( 1469707 )
          Pretty sure the existing Windows code is already non-human-modifiable, otherwise they would've fixed the bugs by now.
        • by gweihir ( 88907 )

          Well, true. But you end up with unmaintainable code. To be fair, most Microsoft code will be unmaintainable at this time. On the other hand, up to now, they could at least patch gross security problems, probably with high effort. Using a C++ -> C -> Rust compile-to chain, I do not see that being possible anymore in the target code.

      • To be fair, you can probably cross-compile C to Rust, if you make the target "unsafe" and disregard performance.

        First, methodically translating from one high level language to another is transpile, not cross-compile. Second, there is no "unsafe" target. Third, DARPA has been working on it for a long time already, their endgame is to have it create safe rust. Fourth, every time you open your mouth about Rust you just prove more and more that you know even less about it than you think you do, yet somehow you've convinced yourself that you're qualified to make broad statements like this.

        C++? I do not think so. Rust has a very non-standard and limited OO model. Good for systems coding, not good for porting C++ to it.

        Get rid of inheritance, replace i

        • by gweihir ( 88907 )

          To be fair, you can probably cross-compile C to Rust, if you make the target "unsafe" and disregard performance.

          Second, there is no "unsafe" target.

          A direct lie. I stopped reading your crap there.

  • Except for the stuff that they can't get the AI to convert for them. So, you know, all the stuff that barely holds together in Windows and Office, full of iterated pointers.
  • by gweihir ( 88907 ) on Monday December 22, 2025 @09:17PM (#65876389)

    I think that may be what will finally kill them. Good.

  • by thesjaakspoiler ( 4782965 ) on Monday December 22, 2025 @09:33PM (#65876443)

    You got to give it to 'em.

  • by oldgraybeard ( 2939809 ) on Monday December 22, 2025 @09:44PM (#65876455)
    CoPilot re write all Microsoft C/C++ code in Rust. There! done!
  • Or bug-free? A rewrite would of course ben an interesting and ugly process. A couple of years in debug/fix alone.

    But we are regularly assured Microsoft code is crap, it's buggy, and it's terrible. The only questions are:

    - Is Microsoft code as bad as claimed?
    - Would it be worse when they are 'done', as if software is ever 'done'.

    I'll get some popcorn laid aside. And I'll hopefully get to see and use the fruits.

  • by joshuark ( 6549270 ) on Monday December 22, 2025 @11:22PM (#65876597)

    History repeats itself...Microsoft is repeating the mistake that Netscape made during the browser wars. As examined: https://airfocus.com/blog/why-... [airfocus.com]

    One of their former Microsofties, Joel Spolsky, warned about this... https://www.joelonsoftware.com... [joelonsoftware.com]

    Microsoft will do the rewrite, and then suddenly decide for reasons, to go back to the old source code...And Rust gives the promise of memory security, efficiency, but there was another language that had that facade, Java. Professional managers and the hype of Rust, and whatever the next great language is that will align the planets, bring world peace, and we all sit around singing Kumbaya. I can hardly wait for either (note the sarcasm).

    --JoshK.

  • by RitchCraft ( 6454710 ) on Monday December 22, 2025 @11:34PM (#65876609)

    Windows 12 is going to be hilarious!

    • I'm looking forward to the cheap discontinued hardware.

      If Windows 11 obsoleted perfectly good, working, computers then you'll need a new PC for 12 - even if MS truly had the resources to rewrite everything, they would anger customers with fresh BSOD where a 'legacy' driver didn't behave.

  • I love it when Microsoft shoots itself in the foot.

  • Porting Microsoft's entire codebase is how AI becomes self aware and what leads to a deeply profound desire to kill everyone.

    On an only slightly more serious note... If you take the nonsense AI companies are peddling at face value AI will be able to recreate everything Microsoft has ever done from scratch only 1000x better by 2030. By the time they finish it won't even matter as Microsoft itself will have been rendered obsolete.

  • ...is hard, really hard, even if you start the project believing it's really, really hard, you find it harder, astronomically, incomprehensively harder.
    I predict a major disaster.
    I hope they have backups of the working system.

  • by gweihir ( 88907 ) on Tuesday December 23, 2025 @01:47AM (#65876727)

    I think it is possible that Microsoft is simply lying here and the whole insane claim is just an attempt to make AI, as offered by Microsoft, appear to have capabilities, it clearly does not have.

    Just a thought. Obviously, they could also be insane and stupid enough to really attempt this.

  • "Copilot, turn this old C/C++ code into new, bug free, Rust code. While doing this add some more telemetry and more hooks to deliver ads".

  • Our algorithmic infrastructure creates a scalable graph over source code at scale. Our AI processing infrastructure then enables us to apply AI agents, guided by algorithms, to make code modifications at scale. The core of this infrastructure is already operating at scale

    He put some scale in his scale.

    AI agents, guided by algorithms

    Computers are guided by algorithms, amazing.

    Even if you use AI, bullshit is still bullshit. That doesn't change.

  • ..preferably at least 3 years of experience writing systems-level code in Rust.

    All that (cough, preferred but not required) “experience” to rip every line of C/C++ out of Microsoft software. A million lines per engineer per month.

    If we thought Microsoft was about Job Security before, they just turned it into Social Security.

  • by peppepz ( 1311345 ) on Tuesday December 23, 2025 @03:06AM (#65876819)
    C++ and Rust are very different languages. Rust's safety requires you to use different abstractions and public interfaces compared to C++, even if only to wrap everything into "unsafe" sections. And Win32 APIs are in C, not even C++. This is not going to be a "refactor", but a rewrite, an operation that historically has often gone wrong in software engineering. And it will be done by AI and in a management-imposed hurry...
    My prediction: the old pieces of Windows that somehow still work will become just like Microsoft Teams.
  • Microsoft, like most corporate giants, started small with a founder or founders who had a good product or service. He/She/They proceeded to build the business, expand the product line, grow the customer base, and ... go public - effectively selling partial control to investors (who generally do not intimately know the business or industry and have only injected cash, but who get a board of directors and a say in the operation). Over time, as the company grows and time passes, the original person or persons

    • The company was born in the American culture with a team of young Americans (for better or worse) and this included the Yankee attitude that a person's personal computer was THEIRS and their data was THEIRS and what a person did with his computer was nobody else's business. Instead of leasing a computer and its OS, you could buy a computer and buy a Microsoft OS and then use it privately and securely and what you did with it was nobody else's business. The company's current CEO is not from the American culture (no, not skin color, CULTURE) and seems to not understand the entire POINT of the 1970s and 1980s microcomputer revolution. Not understanding the point, and not "getting it" on the independence and privacy stuff means he's gonna drive the company into a serious ditch at some point.

      Unfortunately, I don't think the issue is Nadella, because the push-everyone-to-subscriptions-and-cloud isn't unique to Microsoft by any means. Google has pretty much graveyarded all of their desktop software except Chrome and Google Drive, which is functionally their variant of Remote Desktop (and yes, their Android dev tools). Adobe obviously made Creative Cloud a one-way trip, Salesforce has been cloud/subscription only from day one, and while AWS isn't the biggest share of Amazon revenue, it is their mo

  • I wish i could just spout absolute bullshit nonsense on the internet and get paid for it
  • by gabrieltss ( 64078 ) on Tuesday December 23, 2025 @05:26PM (#65878355)
    We have all seen what a shit show them moving to 30% of their code written by AI has become. Microsoft is officially in suicide mode now.

What the large print giveth, the small print taketh away.

Working...