9 ms·
Microsoft to replace all C/C++ code with Rust
- Rochus 9mo agoNo wonder Herb Sutter left Microsoft.
- johndoe0815 9mo ago"“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" What can go wrong? Yikes...
- locknitpicker 9mo ago> What can go wrong? Yikes.. The post is clearly aimed at self-promotion. The guy is basically referring to mundane things like using transpilers to generate Rust from C. Those have been around for a few years now, such as C2Rust[1]. At best, this sort of project is looking for corporate backing to politically handle this sort of migration. At this point this sort of stunt is hardly technical, and instead it's something between a publicity stunt and managing technical debt. [1] https://c2rust.com/ https://c2rust.com/
- LeFantome 9mo agoI think it would be more interesting to more creatively rewrite functions or even modules around tests. C2Rust is not going to be very idiomatic.
- locknitpicker 9mo ago> C2Rust is not going to be very idiomatic. That's irrelevant when discussing migrating large volumes of code. The hard part is migrating the project to another tech stack and setup proper test coversge. After that point, nice-to-haves such as idiomatic code is treated as mundane maintenance work.
- evil-olive 9mo ago> “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. from the LinkedIn post [0]: > I have an open position in my team for a IC5 Principal Software Engineer. The position is in-person in Redmond. > My goal is to eliminate every line of C and C++ from Microsoft by 2030. so perhaps a more accurate title would be "one guy at Microsoft, in a LinkedIn job posting, says it's his goal to replace all C/C++ code with Rust" 0: https://www.linkedin.com/posts/galenh_principal-software-engineer-coreai-microsoft-activity-7407863239289729024-WTzf/ https://www.linkedin.com/posts/galenh_principal-software-eng...
- ghandi25 9mo agoInstead of wasting time on this, I’d hope they’d transition to a Linux core.
- avaer 9mo agoIt might actually happen. Either way there would be a gradual transition from C++ to Rust.
- gucci-on-fleek 9mo agoWhy? I'm a pretty dedicated Linux user, but I'd argue that Windows NT is a far better technical architecture than GNU/Linux, it's just the Win32 and shell stuff that sucks. But in this hypothetical transition, Win32 and the shell would be one of the only things that Microsoft keeps, which seems like the worst of both worlds to me. If we're talking hypotheticals, I'd much rather Microsoft open source the NT kernel and low-level subsystems (like ntdll.dll). Open sourcing all of Windows would be even better, but that seems nearly impossible to me.
- scrubs 9mo ago"just the Win32 and shell stuff that sucks" Well, it's way beyond sucks. But ok: is it even possible to run windows with just a command line ... no ui, no graphics, start menu, no file manager or is the ui too integrated into the OS?
- jtchang 9mo agoFundamentally is there anything you can't write in rust and must write in C? With AI languages should mostly be transposable even though right now they are not.
- t-writescode 9mo agoWhy rewrite something with multiple decades of validation and bugs-now-depended-upon-features? Word and Excel almost certainly have 30 year old C++ code that #must-not-be-touched, bugs and all.
- HackerThemAll 9mo agoSecurity. I know it's boring for most, but important for those who need to handle cybersecurity issues.
- canucker2016 9mo agoSo they're going to port Microsoft Edge web browser to Rust? Are they going to upstream their changes to the Google Chrome-codebase?
- leftbehinds 9mo agoMozilla seems to be doing well after inveting rust and rewriting firefox using rust
- canucker2016 9mo agoAccording to https://4e6.github.io/firefox-lang-stats/ https://4e6.github.io/firefox-lang-stats/ , only 12.3% of Firefox is written in Rust.
- jiggawatts 9mo agoSome of the “algorithms” libraries in C++ are very difficult to express in safe Rust and might require proc macros. Most anything related to “intrusive linked lists” is difficult or outright impossible in safe Rust, but is commonly used in operating system code.
- bluehex 9mo agoAnyone who's done some vibe coding can imagine what a mess a vibe coded operating system is going to be with current day tools. LLM agent coding is good at making small prototype web apps and the like but trying to apply it to significantly complex legacy software is a nightmare.
- camdenreslink 9mo agoI'm not sure I'd feel comfortable making large changes to a complex legacy code base with just an LLM. But I think an LLM could be a big help to try to understand a complex legacy code base. As long as you are verifying what it is saying (which you would naturally kind of have to for that use case).
- bluehex 9mo agoI absolutely agree with you. I think this quote in the article gave me the impression that they are talking more about vibe coding it at scale rather than llm assisted engineering. "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.’"
- binary132 9mo ago[flagged]
- Grimblewald 9mo agoI think, given the level of jank we see in W11, we are already feeling the effects of vibe coded OS stuff. Sure right now it's surface layer stuff that mostly breaks things like your start menu or file explorer, you know, basic stuff no one will notice, once you bring this digital cancer into the OS's core functionality all hell will break loose.
- avaer 9mo agoAs off the wall as this kind of thinking is, I actually agree this is probably what Microsoft has to embrace, and this isn't even going far enough. Anyone who has experience with LLMs knows that strong typing, static validation, and testing is how you get the most out of codegen. The kind of thing Rust is for. I can think of ways to do this gradually, that would actually work. It's something that would take years to see effects in a C++ codebase but I think the alternative of sticking with C++ is a dead end. Somewhat relevant: I chuckled at this (quite accurate) 2 hour overview of the unfixable problems with C++: https://www.youtube.com/watch?v=7fGB-hjc2Gc https://www.youtube.com/watch?v=7fGB-hjc2Gc. Unreliable source: I worked at Microsoft (on C++) many years ago and I've been writing C++ on/off for ~15 years.
- LeFantome 9mo agoRust could work really well with AI. “If it compiles, it is probably correct” is a major aid if you do not actually understand what the code is doing. AI and the compiler could be powerful partners.
- wavemode 9mo agoTitle is "Microsoft to replace all C/C++ with Rust" Meanwhile the content of the post is merely that an engineer who works for a team within Microsoft's AI division wrote on LinkedIn "my goal is to eliminate every line of C and C++ from Microsoft". (He believes that he can get AI agents to accomplish this.) Not quite the same as an official plan announced by the CTO or something. Bit misleading title.
- scrubs 9mo agoThis guy is daydreaming to be done by 2030. May as well throw in super conductors at room temp and 1 atm pressure too.
- pjmlp 9mo agoGiven that research projects like Drawbridge end up in products like WSL 1.0, and SQL Server on Linux, many of his dreams come true.
- Someone 9mo agoI don’t think he is daydreaming; he is selling a job opening. If he said “by 2050” or “by 2100”, I bet he would get fewer applicants. I also think the applicants he would get would be of lower quality.
- pjmlp 9mo agoThat guy is relatively high on Microsoft, anyone that is using WSL, has to thank his Microsoft Research department for OS research. https://www.microsoft.com/en-us/research/people/galenh/projects/ https://www.microsoft.com/en-us/research/people/galenh/proje...
- wavemode 9mo agoMy point is not about the person or their accomplishments. My point is that "Microsoft to replace all C/C++ code with Rust" is a misleading title when it's actually just a stated goal of someone working on an aspirational research project.
- akamaka 9mo agoGreat to know that all of the existing bugs in Microsoft’s code will be faithfully translated into Rust using LLMs.
- digitalPhonix 9mo ago> Our North Star is ‘1 engineer, 1 month, 1 million lines of code.’ A guiding metric on lines of code. How could this possibly go wrong?
- HelloNurse 9mo agoThe important metric is how many tests need to be written to trust those lines of code (in one month, and more ludicrously by one engineer). Maybe the plan is not testing because they think that Rust is "safe" and automatic translation is smarter than a typical Microsoft employee.
- blibble 9mo ago> automatic translation is smarter than a typical Microsoft employee. not really a high bar is it...
- HelloNurse 9mo agoDelusional rockstar engineers might really have this kind of opinion of their LLMs and their colleagues. With less sarcasm, how bad is Microsoft as a workplace? The source of this kind of naively arrogant proclamation can be anything from a single rotten apple, to a critical mass of unchecked idiots in the same business unit, to normal for the company culture, to a top-down mandate.
- khaelenmore 9mo agoA sinking ship is becoming a sunken ship, I guess. With this rate of changes and "AI" in charge, I would be surprised if Windows will not finally turn into an unusable mess of bugs, memory leaks (no, Rust does not prevent them) and ruining the compatibility with all of the apps in process (the highlight of Windows, keeping people to still use it despite all MS effort to ruin the OS)
- uecker 9mo agoMy personal goal was to replace all of Microsoft in my life. I mostly achieved this 30 years ago with the help of a C program. Now I only have to use Microsoft products when other people I collaborate with insist on using them. So if Rust with the help of AI wll kill Microsoft with this project, this would make me very happy and I certainly will look at this language much more favorably.
- stockresearcher 9mo agoIf this was a real project, they’d start from scratch and design the OS using Rust idioms. But it’s nothing more than marketing drivel. The goal is for clueless C-level folks to say “if MS can do this with their AI, surely we can take care of our problems using a few copilot subscriptions and a large layoff!”
- ndiddy 9mo ago> Our North Star is ‘1 engineer, 1 month, 1 million lines of code.’ How do they intend to accomplish this? Assuming 40 hour work weeks (160 hours/month), and even assuming a developer would spend their entire 8 hour work day solely reviewing generated Rust code, that would still be ~104 lines of code per minute. At that point what value does the engineer they're hiring even have if they'd just be scrolling through the code and giving it a cursory glance?
- worik 9mo agothis is a really bad idea. A million lines of code per engineer per month, they say. What a dreadfully bad use of excellent technology! LLMs could help the review all that code, and help their programmers find problematic C or C++ code that could be fixed, or perhaps replaced with Rust. What they are proposing is mindless foolishness. AI slop on an industrial scale Rust is good. Rust is not magic
- markus_zhang 9mo agoIn one of the comments he talked about concurrency safety. As someone who has just touched the lock implementations in a toy OS -- xv6, I found concurrency issues to be extremely easy to flare up and very hard to debug. Does Rush provide something lock-related that is similar to memory safety?
- ChrisArchitect 9mo agoLinkedIn poster updated the post: > Update: It appears my post generated far more attention than I intended... with a lot of speculative reading between the lines. > Just to clarify... Windows is *NOT* being rewritten in Rust with AI. > My team’s project is a research project. We are building tech to make migration from language to language possible. The intent of my post was to find like-minded engineers to join us on the next stage of this multi-year endeavor—not to set a new strategy for Windows 11+ or to imply that Rust is an endpoint.