Microsoft is gradually advancing the tools available to developers aiming to create Windows drivers using the programming language Rust. However, significant challenges remain before Rust can be conventionally used in production environments. Developers now have access to enhanced tools and sample frameworks, yet they continue to face constraints that make the widespread adoption of Rust for production still out of reach.
Progress in Rust Development for Windows Drivers
Tools built around Rust, such as the cargo-wdk extension, are evolving as vital assets for developers. This extension offers a streamlined way to develop Windows drivers, allowing the creation of KMDF driver templates with commands like
Senior software engineer Nate Deisinger notes that while there are existing Rust crates for creating Windows 11 drivers using the Windows Driver Model (WDM), Kernel-Mode Driver Framework (KMDF), or User-Mode Driver Framework (UMDF), they still require unsafe code blocks for interaction with the Windows operating system. This compromises some of Rust's safety benefits, although it maintains potential safety advantages for business logic. The Windows Driver Frameworks team is focusing on developing safer abstractions in Rust to minimize the unreliable code sections.
Obstacles to Production Use
Microsoft has acknowledged that the project is still in its early days, emphasizing that writing production-ready drivers in Rust is currently not advisable. Even though the software giant allows developers to experiment with the code, the typical procedures for getting production drivers signed by Microsoft still apply. This includes analysis by tools like GitHub's CodeQL, which has recently started supporting Rust in its public preview. However, the versions approved for compatibility with the Windows Hardware Compatibility Program (WHCP) remain limited, delaying the mainstream production capability of Rust.
Efforts are underway to optimize processes such as adding ARM64 support, automatic dependency installation, and driver deployment directly to test machines, which indicates future readiness for broader adoption. Additionally, Microsoft is planning to release more information about the process of submitting Rust drivers to WHCP in the upcoming months, making incremental yet crucial strides toward eventual production usage.
The Road Ahead for Rust in Windows Kernel
The aspiration to incorporate Rust more extensively into the Windows ecosystem stems from Microsoft Research’s interest in using it to address memory-safety issues. This interest was first highlighted in 2019. Furthermore, in 2022, Azure CTO Mark Russinovich endorsed Rust over C/C++ for new projects due to its safety features. In the intervening years, substantial groundwork has facilitated closer integration of Rust into Windows, particularly with components of Rust already embedded into the Windows 11 24H2. While the emergence of these tools signals significant progress, realization in terms of comprehensive production-ready Rust drivers is a prospect still on the horizon.



