3 releases

0.1.3 Sep 30, 2025
0.1.2 Jun 20, 2025
0.1.1 Aug 25, 2023
0.1.0 Aug 25, 2023

#204 in Windows APIs

Download history 6/week @ 2025-09-13 13/week @ 2025-09-20 111/week @ 2025-09-27 28/week @ 2025-10-04 16/week @ 2025-10-11 14/week @ 2025-10-18 4/week @ 2025-10-25

218 downloads per month
Used in 2 crates (via wdi)

MIT/Apache

725KB
17K SLoC

C 14K SLoC // 0.1% comments Rust 1.5K SLoC // 0.1% comments Visual Studio Project 1.5K SLoC Shell 230 SLoC // 0.2% comments Visual Studio Solution 124 SLoC Automake 78 SLoC // 0.0% comments INI 13 SLoC // 0.5% comments Forge Config 5 SLoC // 0.4% comments Batch 2 SLoC

Contains (obscure autoconf code, 13KB) libwdi/configure.ac

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.

libusb-win32 and libusbK support

By default, the library provides WinUSB support only. Two other drivers are supported by libusb0 and libusbk features. The only requirement is to provide driver paths through environment variables (respectively, LIBUSB0_DIR and LIBUSBK_DIR).

Dependencies

~0–2.2MB
~42K SLoC