windivert-sys-0.9.0 has been yanked.
WinDivert 2 Rust Wrapper
Note: This is a work in process, so the crates won't follow semantic versioning until 1.0.0 release, so any version change below 1.0.0 might introduce breaking changes in the API or the crate usage in general.
This projects allows you to use WinDivert from rust. It consists of two crates:
windivert-sys: Crate providing raw bindings to the WinDivert user mode library.
windivert: (WIP) Built on top of
windivert-sysand providing a friendlier Rust API and some abstractions.
Build
To be able to build windivert-sys you require WinDivert library files:
- It's recommended to specify the path of the folder containing downloaded dll, lib & sys files using the
WINDIVERT_PATHenvironment variable. - As a fallback windivert dll & lib files can be compiled from source if the vendored feature is enabled. To avoid multiple compilations set
WINDIVERT_DLL_OUTPUTenvironment variable to save the generated build. This method won't compile the sys driver files required to use windivert. Sys files must always be provided.
Usage
windivert-sysshares the same API the native library uses. Read official documentation for more details.windivertWIP
Note: WinDivert dll expects the corresponding driver sys file to be located on the same folder. Since the dll lib & sys files come in the same folder when downloading from official web windivert-sys will search for it on the path provided with WINDIVERT_PATH.