TIPS & TRICKS

Microsoft officially brings Rust into Windows driver development

Microsoft Chính Thức Đưa Rust Vào Phát Triển Driver Windows

Microsoft is accelerating the adoption of Rust, a programming language highly regarded for its memory safety, to support safer and more efficient Windows driver development. This is the next step in the Redmond giant’s efforts to minimize errors and strengthen Windows operating system security.

Rust support for Windows drivers is ready

In a recent blog post, Microsoft shared details about the tools being developed to help developers write Windows drivers using Rust. Traditionally, Windows driver development was performed via the Windows Driver Kit (WDK) using the C language, with a full suite of supporting libraries and tools. Now, Microsoft is bringing those features to the new language.

Microsoft Officially Brings Rust Into Windows Driver Development

The windows-drivers-rs source code repository on GitHub has been launched, providing a complete set of Rust crates such as: wdk-build (Cargo support library), wdk-alloc (memory allocator), and wdk-macros (macros for optimized WDK interaction). These Rust crates allow for the creation of kernel-mode and user-mode drivers running on Windows 11.

In parallel, Microsoft is also developing the cargo-wdk utility for integration into Visual Studio. This utility will create empty driver projects with pre-written code, link libraries, and set up automated build processes, helping developers easily initialize Rust driver projects in a familiar environment.

Towards a safer future for Windows drivers

Microsoft emphasizes that the long-term goal of the project is to provide a Rust driver development experience that is just as convenient as C. It is expected that cargo-wdk will be updated with more driver templates, ARM64 support, direct deployment to test devices, and many additional features.

Although Rust is designed with high safety, many current drivers still require “unsafe code” to interact with Windows kernel APIs. The Windows Driver Framework team is collaborating with Rust experts to build safer abstractions, but this will require significant time and coordination across multiple teams.

Microsoft‘s serious investment in the Rust driver framework not only demonstrates the trend of language shifting in operating system development but also serves as a major announcement for security and reliability in an era of rapid software evolution.

Share: 𝕏 P in
Question and answer (0 comments)

Table of contents
  1. Top