Blog Post

Surface IT Pro Blog
4 MIN READ

Safer Drivers, Stronger Devices

Melvin_Wang's avatar
Melvin_Wang
Icon for Microsoft rankMicrosoft
Jul 24, 2025

How Surface is advancing Windows Driver development in Rust

When it comes to device security, the conversation often centers on software updates, antivirus tools, or cloud protections. But what about the code that talks directly to your hardware—the drivers? These low-level components are essential to performance and reliability, forming a critical foundation for device security.

At Surface, we are improving the security and reliability of Surface devices and drivers and raising the security bar for the entire Windows ecosystem by embracing Rust, a modern programming language designed with memory safety at its core.

Since our last update, the Surface team has contributed further to the open-source windows-drivers-rs for driver development and shipped Surface drivers written in Rust. This not only enhances the security posture of Surface devices—it also supports industry-wide and national initiatives to advance memory safety, as emphasized in a recent joint press release from the NSA and CISA.

The impact of the Rust Windows Drivers platform

What is windows-drivers-rs?

windows-drivers-rs is a Microsoft open-source project focused on enabling Windows driver development using the Rust programming language. Microsoft invites developers across the ecosystem to contribute, learn more about Rust, and help shape the future of Rust driver development on Windows. The Surface software team is a primary contributor to the platform.

The GitHub repository includes:

  • Rust Crates: A collection of crates that enables the development of Windows Drivers in Rust
  • Documentation, Samples, and Guides: Helps developers get started with exploring Windows drivers in Rust.
  • Community Collaboration: Invites contributions, feedback, and collaboration from the broader community interested in advancing Rust for systems and kernel development on Windows.
Access the open resource repository for windows-drivers-rs on GitHub

 

Why write Windows Drivers in Rust?

Driver development has long relied on C and C++, languages that offer performance but little protection against common pitfalls like buffer overflows, null pointer dereferences, or race conditions. Writing Windows Drivers in Rust changes that.

Here’s how:

  • Memory Safety: Rust’s ownership model and borrow checker can eliminate entire classes of bugs—like use-after-free or double-free—that often lead to security vulnerabilities.
  • Type and Concurrency Safety: By default, Rust enforces strict type checks and catches data races at compile time, making multi-threaded driver code safer and more predictable.
  • Compile-Time Abstractions and Guarantees: By leveraging zero-cost abstractions and Rust’s strong static analysis, many bugs are caught at compile time, before the code ever gets a chance to run.
  • Interoperability: Leveraging Rust’s Foreign Function Interface (FFI) features, developers can enable interoperability between Rust and existing C/C++ driver code, making it easier to adopt Rust incrementally in existing projects.

The result? Drivers that are not only more secure, but also easier to maintain and evolve.

Surface develops & delivers

By integrating Rust drivers into our shipping products, we’re reducing the attack surface with memory safety and improving reliability for our customers who depend on Surface every day. We’re proud to share that Surface has now shipped several Copilot+ PCs with drivers written in Rust using code built on top of the windows-drivers-rs platform:

What’s next?

Surface will continue to deepen its investment in Rust driver development through several focused initiatives:

  • Enhancing the platform for Windows Drivers in Rust to support a broader range of driver types, making it viable for more hardware scenarios
  • Advancing feature support to bring the Rust-based toolchain closer to parity with the existing Windows Driver Kit (WDK), helping developers transition more easily
  • Expanding the availability of safe, open-source abstractions. Today, all Rust drivers shipped on Surface devices rely on internally developed safe abstractions layered over the FFI capabilities provided by the windows-drivers-rs crate family - particularly the wdk-sys crate. Looking ahead, we’re collaborating with partners to generalize these abstractions and make them available in the public GitHub repository, enabling broader community use and contribution.
  • Partnering across Microsoft to accelerate internal adoption and improve tooling, documentation, and long-term maintainability.

Together, these efforts aim to make Surface drivers even more reliable and secure. In the long term, this work won’t just improve our own devices - it will help strengthen the Windows ecosystem for all hardware partners.

Join the movement

If you’re passionate about secure systems, modern tooling, or just curious about Rust on Windows, we’d love to connect.

  • The Surface team will be at RustConf 2025 this September in Seattle—come find us, share your ideas, and help us build a safer foundation for Windows.
  • Check out the Windows Driver Rust project on GitHub. Start a discussion, file an issue, contribute a pull request, or contact us about the project.

Together, we can make memory safety the default!

Updated Jul 24, 2025
Version 2.0
No CommentsBe the first to comment