Microsoft is rewriting the core Windows code in Rust

Microsoft is rewriting their core libraries in the Rust programming language, and the more memory-safe code has already reached developers.

microsoft rust

David “dwizzle” Weston, director of OS security for Windows, announced the arrival of Rust in the operating system core at BlueHat IL 2023 in Tel Aviv, Israel, last month.

"We're actually going to have Windows boot with Rust in the kernel in the next few weeks or months, which will be really cool," Reported. "The main goal here was to convert some of the internal data types from C++ to their Rust equivalents."

Microsoft showed interest in Rust several years ago as a way to detect and eliminate in-memory security flaws. These bugs are at the heart of about 70% of the security vulnerabilities included in the CVE list and patched by Windows developers since 2006.

Last September, an informal order was given: Microsoft Azure CTO Mark Russinovich said new software projects should use Rust, not C/C++.

Windows' transition to Rust began in 2020 with DWriteCore, the engine's Windows App SDK DWrite of Windows for text, layout and performance. DWriteCore now consists of about 152.000 lines of code in Rust and about 96.000 lines of code in C++.

In addition to the supposed security improvement, performance is reported to be 5 to 15% faster by replacing OpenType Library Services.

All of these are already available to Windows developers.

The Microsoft Windows graphics device interface (Win32 GDI) is currently ported to Rust and has 36.000 lines of code. The latest version of it launches with the Rust build, which passes all GDI tests, but the Rust port is currently disabled behind a feature flag.

"There's actually a SysCall in the Windows kernel now that runs on Rust," Weston said.

But "the re of Windows to Rust probably isn't going to happen anytime soon," said Weston, "while we love Rust, we need a strategy that includes securing more native code."

iGuRu.gr The Best Technology Site in Greecefgns

every publication, directly to your inbox

Join the 2.082 registrants.
Rust, Microsoft, Windows

Written by giorgos

George still wonders what he's doing here ...

Leave a reply

Your email address is not published. Required fields are mentioned with *

Your message will not be published if:
1. Contains insulting, defamatory, racist, offensive or inappropriate comments.
2. Causes harm to minors.
3. It interferes with the privacy and individual and social rights of other users.
4. Advertises products or services or websites.
5. Contains personal information (address, phone, etc.).