3 ms·
On a semi-tangent, does anyone happen to know how Microsofts push to use Rust in the Windows kernel is coming along? They rewrote some components in Rust and ro
by jsheard 2y ago
On a semi-tangent, does anyone happen to know how Microsofts push to use Rust in the Windows kernel is coming along? They rewrote some components in Rust and rolled them out to production about a year ago but it has seemed pretty quiet on that front since then, unless I missed something.
- tsujamin 2y agoI noticed the other morning that they’ve either re-written or are growing the win32k driver in rust. This was either in Server ‘25 or vNext though I can’t remember. Given win32k implements a good chunk of the kernel-mode graphics and windowing system it’s a pretty good place to start that effort. edit: win32kbase_rs.sys was what it was called, and I’m pretty sure it was 2025 I pulled it from but it might be on earlier versions too
- okwubodu 2y agoOut of curiosity, how did you notice this?
- tsujamin 2y agoI was hunting for what Windows libraries used a particular new API and saw it in my scrolling! You can see all the panic and error strings, and some internal package paths if you run strings over it. Win32k looks like it got split pretty hard into a couple of sub libraries in recent versions though (win32k, win32kbase, win32kbase_rs etc)
- npalli 2y agoI googled for this file and I LOL'ed as the first link was a crash report linked to this one. https://www.elevenforum.com/t/latest-beta-causing-program-crash-culprit-win32kbase_rs-sys.21375/ https://www.elevenforum.com/t/latest-beta-causing-program-cr...
- steveklabnik 2y agoThey haven’t spoken publicly about it. As a Windows user, I am very intrigued!
- pjmlp 2y agoThey have, provided you pay attention to Windows developer channels, see my reply, https://news.ycombinator.com/item?id=41645415 https://news.ycombinator.com/item?id=41645415
- steveklabnik 2y agoThanks! I’m aware of most, but not all of that. But that stuff isn’t kernel stuff, though obviously much of it is serious systems work. That’s what I was referring to specifically.
- pjmlp 2y agoBesides GDI regions and CoreWrite, there isn't much public info. They dumped Rust bindings to DDK, but it is more a over the fence kind of thing. WinDev is culturally against anything not C++, see .NET adoption for key Windows features versus what happens on Apple/Google OS land. I am quite curious on how WinDev will proceed with Rust and .NET versus C++, given the new security mandate tied to job evaluation.
- pjmlp 2y agoWhile they are rather quite on that front, Rust is now the official systems language for new projects in Azure infrastructure, with C#, Java and Go as alternative is a managed language is also possible. "Decades of vulnerabilities have proven how difficult it is to prevent memory-corrupting bugs when using C/C++. While garbage-collected languages like C# or Java have proven more resilient to these issues, there are scenarios where they cannot be used. For such cases, we’re betting on Rust as the alternative to C/C++. Rust is a modern language designed to compete with the performance C/C++, but with memory safety and thread safety guarantees built into the language. While we are not able to rewrite everything in Rust overnight, we’ve already adopted Rust in some of the most critical components of Azure’s infrastructure. We expect our adoption of Rust to expand substantially over time." From https://azure.microsoft.com/en-us/blog/microsoft-azure-security-evolution-embrace-secure-multitenancy-confidential-compute-and-rust/ https://azure.microsoft.com/en-us/blog/microsoft-azure-secur... Several key projects have been migrated to Rust, or started from Rust althogether. => Azure Boost https://learn.microsoft.com/en-us/azure/azure-boost/overview https://learn.microsoft.com/en-us/azure/azure-boost/overview "Rust serves as the primary language for all new code written on the Boost system, to provide memory safety without impacting performance. Control and data plane operations are isolated with memory safety improvements that enhance Azure’s ability to keep tenants safe." => OpenHCL, Azure's para-virtualization https://techcommunity.microsoft.com/t5/windows-os-platform-blog/openhcl-evolving-azure-s-virtualization-model/ba-p/4248345 https://techcommunity.microsoft.com/t5/windows-os-platform-b... "OpenHCL is a para-virtualization layer built from the ground-up in the Rust programming language. Rust is designed with strong memory safety principles, making it ideally suited for the virtualization layer." => Security processor Pluton firmware (used by XBox, Azure and CoPilot+ PC hardware) https://learn.microsoft.com/en-us/windows/security/hardware-security/pluton/microsoft-pluton-security-processor https://learn.microsoft.com/en-us/windows/security/hardware-... Post from David Weston, Microsoft's vice president of OS security regarding the Rust rewrite and TockOS adoption, https://x.com/dwizzzleMSFT/status/1803550239057650043 https://x.com/dwizzzleMSFT/status/1803550239057650043 => CoPilot+ UEFI firmware https://techcommunity.microsoft.com/t5/surface-it-pro-blog/rust-support-for-uefi-development-through-project-mu/ba-p/3970582 https://techcommunity.microsoft.com/t5/surface-it-pro-blog/r... "Surface and Project Mu are working together to drive adoption of Rust into the UEFI ecosystem. Project Mu has implemented the necessary changes to the UEFI build environment to allow seamless integration of Rust modules into UEFI codebases. Surface is leveraging that support to build Rust modules in Surface platform firmware. With Rust in Project Mu, Microsoft's ecosystem benefits from improved security transparency while reducing the attack surface of Microsoft devices due to Rust’s memory safety benefits. Also, by contributing firmware written in Rust to open-sourced Project Mu, Surface participates in an industry shift to collaboration with lower costs and a higher security bar. With this adoption, Surface is protecting and leading the Microsoft ecosystem more than ever."