In context: Rust is a general-purpose language designed for building fast and secure software. Its strong focus on memory safety aims to eliminate most memory-related bugs and security vulnerabilities. The language excels in web services and system software development and could soon play a key role in Windows development as well.
Microsoft began adopting Rust for core Windows programming a few years ago, praising the relatively new language as a key tool for reducing bugs and enhancing security. The company has now unveiled some of the work aimed at making Rust development easier and more effective for Windows driver projects.
In a recent blog post, Microsoft detailed the current state of Rust support for Windows drivers. Developers have traditionally used the Windows Driver Kit to write these scripts in C, with the WDK providing all the libraries and tools needed. Redmond is now working to give Rust developers the same advantage by porting the same libraries and headers to Rust.
Microsoft consolidated these tools into windows-drivers-rs, a GitHub repository containing Rust "crates" – packages managed by Cargo, Rust's build system and package manager. Developers can now use the tools to build Windows drivers.

The windows-drivers-rs repository provides all the resources developers need to build fully functional Rust drivers. These include a library for configuring Cargo build scripts (wdk-build), a global allocator (wdk-alloc), a set of macros to simplify interactions with WDK's direct bindings (wdk-macros), and more. With these crates, developers can already create kernel-mode and user-mode driver binaries that load and run on Windows 11.
Microsoft is also introducing the cargo-wdk project to simplify Rust driver development in Visual Studio. Programmers have long benefited from VS templates that speed up initial C development. The cargo-wdk extension provides VS users with empty driver projects pre-populated with all necessary linkage, build steps, and dependencies.
The Redmond tech giant says the long-term goal of cargo-wdk is to give Rust developers the same building tools and configuration options available to C programmers. The Cargo plugin will soon add more driver templates, code deployment to test machines, full ARM64 support, and additional features.
Developers are also planning to improve safety in Rust driver projects. The current windows-drivers-rs crates still require developers to write a significant amount of unsafe Rust code. The Windows Driver Framework team is collaborating with Rust experts to introduce safer abstractions. However, working with Windows kernel APIs presents a complex challenge, and addressing it will take time and require cooperation across multiple teams.