Towards Rust in Windows drivers

Microsoft has been working on allowing driver developers to write Windows drivers in Rust, and the company has published a progress report detailing this effort. In the windows-drivers-rs GitHub repository you’ll find a bunch of Rust crates for writing Windows drivers in Rust.

Using these crates, driver developers can create valid WDM, KMDF, and UMDF driver binaries that load and run on a Windows 11 machine.

[…]

Drivers written in this manner still need to make use of unsafe blocks for interacting with the Windows operating system, but can take advantage of Rust’s rich type system as well as its safety guarantees for business logic implemented in safe Rust.  Though there is still significant work to be done on abstracting away these unsafe blocks (more on this below), these Rust drivers can load and run on Windows systems just like their C counterparts.

↫ Nate Deisinger at the Windows Driver Developer Blog

As mentioned above, there’s still work to be done with reducing the amount of unsafe Rust code in these drivers, and Microsoft is working on just that. The company is developing safe Rust bindings and abstractions, as well as additional safe structs and APIs beyond the Windows Driver Framework, but due to the complexity of Windows drivers, this will take a while.

Microsoft states that it believes memory-safe languages like Rust are the future of secure software development, but of course, in true Microsoft fashion, the company doesn’t want to alienate developers writing traditional drivers in C either.

9 Comments

  1. 2025-09-03 11:00 am
    • 2025-09-03 12:05 pm
      • 2025-09-03 1:05 pm
        • 2025-09-03 2:16 pm
          • 2025-09-03 3:09 pm
  2. 2025-09-03 11:06 am
    • 2025-09-03 11:23 am
      • 2025-09-03 2:23 pm

Leave a Reply