Microsoft is Getting Rusty [video]
27 comments
·February 26, 2025bsnnkv
Out of the major operating systems, Windows is probably by far my favorite to develop for[1] using Rust. windows-rs[2] is officially supported and is constantly being worked on and improved.
thesuperbigfrog
It's probably just a matter of time before Rust replaces C and C++ for most use cases.
Rust continues to make in-roads in the Linux kernel and userland.
As this video shows, Microsoft is adopting Rust to improve reliability and security.
faitswulff
It’s nuanced. Google has shown that legacy C/C++ code is fairly stable in terms of memory safety bugs. That and the effort and risks involved means that existing C/C++ code is unlikely to be replaced wholesale. But that also means that switching new development to Rust has an outsized effect on preventing new bugs. So expect old code to stick around, but new code to be written in Rust with interoperability with the old code.
pan69
The way I read the parent comment was as in; replacing C/C++ with Rust as a choice for language going forward, not replacing existing C/C++ code bases with Rust.
jcranmer
There are definitely some regions of existing code where legitimately replacing the existing C/C++ functions with Rust is justifiable on its own. The big one I can think of is parsing code--things like parsing fonts (as sibling mentions) or A/V codecs are things that have historically been replete with exploitable memory safety issues and are reliably untrusted data.
p_ing
In the video, Mark talks about Microsoft investing in replacing certain portions of Windows/Office/Azure going C/C++/C# [eliminate GC, SharePoint being mentioned] with Rust. Primarily in security-critical areas, but one of the first points in Windows was font handling, a huge security issue for Windows historically.
null
faitswulff
That’s fair, I think I might have been interpreting it as a call to “rewrite it in rust.”
dralley
Inertia is going to keep C and C++ going for a while. The ship takes a long time to turn and it just started turning in the past couple of years. It's probably more accurate to say that individual ecosystems might become Rust-dominated in the coming years but "most" is maybe a tough call.
Like: I wouldn't be surprised at all if most (new) linux drivers were written in Rust 5 years from now, and software like git and systemd and pipewire and LLVM had started to adopt it. And I basically expect that Rust will be completely dominating internet-facing software like servers, browsers, media parsers and the like within 10 years.
But I'd be pretty surprised if Rust had more than 20% penetration in automotive / aerospace firmware, or gamedev, even 10 years from now.
AlotOfReading
By total LoC owned, sure. I would be completely unsurprised if 20% of major companies in those industries have significant components written in Rust within a decade. It's been a long time since there was this much language interest within the embedded/safety critical domains.
tonfa
Yeah embedded software strikes me as one of those areas where rust can really shine (and where the cost of a crash can be high esp. if you run close to bare metal).
voidfunc
I think folks said the same thing about Java in the 90s...
agarren
Like Java in the 90s, MS have embraced rust, next comes extend. I can’t imagine there’s too much preventing them from forking the entire project as MS-Rust Enterprise Edition Release 1 (tm) and running with it. Vscode will replace rust_analyzer with some preferred MS variant that’s closed source…
bilekas
Don't say that to the linux kernel devs..
DrillShopper
The Linux Kernel development process is the quintessential "Ask 10 people for opinions on where to get lunch and you'll get half the Internet chiming in with their thoughts"
null
bilekas
It is really good to see how they've actually applied Rust rewrited in areas that make sense too, having worked with C++ Microsoft code that was sold to Ericsson I can say it's extremely dense and requires a lot of learning curve time to get a feel for their 'way'. It is very easy to make mistakes we found with the C layers specifically, I wish Rust was around and mature enough at the time to realise a rewrite. The productivity benefits alone would have been worth it.
OutOfHere
The way I think about languages is that one must in their programming journey go toward greater type safety. If the journey begins with JS/Python, it must go to TS/Go, then Rust, then Haskell, and finally Idris.
Type safety is exceedingly and especially important in a shared code development where one is not the only developer.
paiute
Which is why everything ends up as json in the end.
whytevuhuni
But one also has to live and work among newbies, so there is a constant pull in the other direction towards simplicity, otherwise productivity grinds to a halt.
What exactly ends up being the most pragmatic language that strikes the best balance is likely never going to be decided.
johnnyanmac
If companies get their way, there won't be "career newbies". Students will spend years developing a portfolio for free to prove they can out-efficiency an LLM. Which of course will suppress the industry as Tech is no longer this fast path to riches (the actual wage suppression doesn't help either).
on_the_train
[flagged]
Great talk. I wish Mark had gone over the "dislikes" slide a bit longer though. For instance, I'm not sure what "dynamic linking will eventually bite us" means. He says dynamic linking is commonly used on Windows, but I don't understand how that's problematic with Rust.