winapi-rs icon indicating copy to clipboard operation
winapi-rs copied to clipboard

temporary: some km binding of winapi

Open woodgear opened this issue 6 years ago • 4 comments

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

  1. Link lib from a inner crate 'win-kmd-native-lib' instead of linking it from windows DDK installation .
  2. Use custom compiler target because rust has no offical windows kernel target
  3. Some binding does not follow winapi style
  4. 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,

woodgear avatar Apr 15 '19 03:04 woodgear

@retep998 Any plan on KM support?

ivellioscolin avatar Sep 24 '20 02:09 ivellioscolin

I do plan on adding km support, however I don't have the time to dedicate to investigating it fully at the moment.

retep998 avatar Sep 24 '20 13:09 retep998

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?

ivellioscolin avatar Sep 25 '20 03:09 ivellioscolin

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.

rmccrystal avatar Nov 15 '21 21:11 rmccrystal