Microsoft is using Rust to develop some modules of the Windows kernel

At the recently held BlueHat IL 2023 conference, Microsoft’s Corporate Vice President of Enterprise and Operating System Security, David Weston, delivered a presentation discussing the evolution of Windows security, revealing the latest advancements and outlining future plans.

One significant change is Microsoft’s shift from C++ to Rust programming language for kernel security module development, though claims that Microsoft will completely rewrite the Windows kernel using Rust are somewhat exaggerated.

Currently, Microsoft employs Rust for the development of select Windows kernel modules, such as memory safety—a focal point for the company in recent years. Microsoft Defender’s kernel isolation feature exemplifies this focus on memory safety.

David Weston announced that Windows 11 would soon incorporate Rust in the kernel. To date, the Microsoft engineering team has added 36,000 lines of code to rewrite specific memory safety modules within the Windows kernel.

Notably, performance tests for Rust-based modules show no issues, and compatibility tests for the Graphics Device Interface (GDI) have been successful. Consequently, Microsoft is confident in employing Rust in the Windows kernel within the coming months, with related test versions likely to be available in the next few weeks.

As for the Windows kernel, it is an immensely complex entity, and it is implausible for Microsoft to rewrite the entire kernel using Rust in a short timeframe. However, as time progresses, more modules are expected to transition from C++ to Rust.