temporary: some km binding of winapi
This PR is aim to show what we done. You could find out how we use rust write driver in win_driver_example That is a example code picked from our private project,but enough to show how we do. in briefly cargo xbuild +custom alloc + custom target + km binding of winapi. but there still some drawbacks
- Link lib from a inner crate 'win-kmd-native-lib' instead of linking it from windows DDK installation .
- Use custom compiler target because rust has no offical windows kernel target
- Some binding does not follow winapi style
- Use MISS_TYPE_PTR to avoid adding some struct which just a pointer. but anyway, you could just use rust to write a windows driver in a simple way,
@retep998 Any plan on KM support?
I do plan on adding km support, however I don't have the time to dedicate to investigating it fully at the moment.
I do plan on adding km support, however I don't have the time to dedicate to investigating it fully at the moment.
Cool. Btw, are these FFI bindings genereated fully by rust-bindgen or other methods?
I would love to see this as well. I am building a kernel-mode driver in Rust and I have to manually define all the functions I want to use. Having KM bindings in this crate or the windows crate would make things much easier, especially when dealing with structs.