Microsoft is accelerating its adoption of Rust, a programming language prized for its memory safety, to make Windows driver development safer and more efficient. It is the latest step in the Redmond giant's effort to reduce bugs and strengthen the security of the Windows operating system.
Rust support for Windows drivers is ready
In a recent blog post, Microsoft detailed the tools it is building to help developers write Windows drivers in Rust. Traditionally, Windows drivers have been written in C through the Windows Driver Kit (WDK), which comes with a full set of libraries and supporting tools. Now Microsoft is bringing those capabilities to the newer language.
The windows-drivers-rs repository on GitHub has launched, offering a complete set of Rust crates, including wdk-build (a Cargo support library), wdk-alloc (a memory allocator), and wdk-macros (macros that streamline interaction with the WDK). These Rust crates make it possible to build kernel-mode and user-mode drivers that run on Windows 11.
In parallel, Microsoft is developing a cargo-wdk utility that integrates with Visual Studio. It generates blank driver projects with boilerplate code, links libraries, and sets up an automated build process, so developers can easily start a Rust driver project in an environment they already know.
Toward a safer future for Windows drivers
Microsoft stressed that the long-term goal of the project is a Rust.driver development experience that is just as convenient as C. The plan is for cargo-wdk to gain more driver templates, ARM64 support, direct deployment to test devices, and other features.
Although Rust is designed with a high degree of safety, many current drivers still need "unsafe code" to interact with Windows kernel APIs. The Windows Driver Framework team is working with Rust experts to build safer abstractions, but this will take considerable time and coordination across multiple teams.
Microsoft's serious investment in the Rust.driver framework reflects not only a shift in languages used for operating system development, but also a statement about its priorities for security and reliability as software takes over more and more of the stack at a rapid pace.

