Rust for Windows Drivers Progresses, but not yet Ready for Use

Rust for Windows Drivers Progresses, but not yet Ready for Use

The development of drivers in Rust is steadily progressing, but they are not yet production-ready.

Microsoft and the developer community are working hard on support for Windows drivers in the systems programming language Rust. Developers who want to write drivers in Rust have better tools at their disposal, but there are still obstacles for use in production environments.

Advantages… And Limitations

According to Microsoft engineer Nate Deisinger, developers can already develop drivers in Rust today using existing packages for WDM (Windows Driver Model), KMDF (Kernel Mode Driver Framework), and UMDF (User Mode Driver Framework). It’s not entirely safe yet: interaction with the operating system often requires ‘unsafe’ code blocks.

Therefore, the Windows Driver Frameworks teams are working on safe abstractions to limit the number of unsafe parts. Work is being done to integrate Rust into the Windows kernel itself (starting from Windows 11 24H2), so that no business logic code is lost during programming.

With cargo-wdk, there’s also a specific extension of Rust’s package manager that allows for easy creation of driver templates, for example with the command “cargo wdk new –kmdf”. Support for ARM64 and automatic installation of dependencies are planned.

Not yet in Production

For now, drivers in Rust can only be deployed after manual approval by Microsoft. In the coming months, Deisinger would share more information about submitting Rust drivers within WHCP (Windows Hardware Compatibility Program).

Four years after Microsoft’s official preference for Rust, the transition for Windows drivers finally seems in sight, but they are not yet ready for use.

read also

Developers embrace Rust