#driver #windows #extremely #progress #path #interface #libwdi

wdi

Rust library for interacting with the Windows Driver Installer subsystem

1 unstable release

0.1.0 Aug 25, 2023

#887 in Hardware support


Used in bmputil

MIT/Apache

740KB
18K SLoC

C 14K SLoC // 0.1% comments Rust 2K SLoC // 0.1% comments Visual Studio Project 1.5K SLoC Shell 229 SLoC // 0.2% comments Visual Studio Solution 123 SLoC Automake 77 SLoC // 0.0% comments INI 12 SLoC // 0.5% comments Forge Config 4 SLoC // 0.3% comments Batch 1 SLoC

wdi-rs — A safe Rust wrapper for libwdi

Warning: this crate is extremely work in progress and the actual wrapping is very bare bones. The functionality implemented exists almost entirely for bmputil.

Cross compilation

Considerable effort has been put into libwdi-sys's build script to ensure cross compilation works as seamlessly as possible. It will, however, require an existing Windows target cross toolchain setup, but cargo-xwin can take care of most of that for you.

The only other requirement is the Windows 8.0 Driver Kit redistributable components, with the environment variable WDK_DIR set to the path it's been extracted to, e.g. export WDK_DIR=/opt/wdk/8.0.


lib.rs:

High-ish level API to libwdi.

This crate is still extremely work in progress, but the major high level functions of interest are [create_list] and [prepare_driver].

Dependencies

~0.5–3MB
~54K SLoC