News for hackers. Stuff that matters.
Re:Writing a Simple Windows Driver in Rust by gpm on Saturday February 08, 2025 @07:23PM (#42987391)
If you look at the readme they have

> wdk: Safe idiomatic bindings to APIs available in the Windows Development Kit (WDK)

And then if you look at that crate they've only implemented dbg_break, print, spinlock, and timer.

I'd take this as a sign that the bindings are a work in progress.

If you're going to write your driver in Rust... honestly I'd recommend just writing the `wdk` crate bindings you need for your driver and probably even upstreaming them. Wrapping FFI bindings in safe abstractions is usually pretty easy - but it's definitely the case that without them rust doesn't give you much.

This sample is using `wdk_sys` bindings directly without wrapping them... which is basically never the recommended way of interacting with the FFI in rust.

There are no comments on this comment yet.