windows-drivers-rs
windows-drivers-rs copied to clipboard
feat: configure WDK configuration via parsing Cargo manifest metadata
This PR enables configuring the WDK Metadata via [metadata.wdk]
tags in Cargo manifests.
As a consequence of that new feature, several other changes were required:
- Added minimal Sample WDM and UMDF drivers
- Make all driver packaging tooling (ex. signing, cat generation, etc) support WDM and UMDF
- Serde Serializer added to export WDKMetadata configuration to a structured format
- Emit that structured format so that downstream code can
cfg
based off of certain WDK configuration parameters * Awdf.c
file is compiled and linked in to provide the__declspec(selectany)
that are not generated by bindgen - Have several templates that generate rust code in
wdk-sys
's build.rs that is otherwise not possible to generate conditionally (ex. call_unsafe_wdf_function_binding definition that points toOUT_DIR
,WDFFUNCTIONS
symbol name that depends on configuration,WDF_FUNCTION_TABLE
definition whose size depends on configuration, etc.) - remove local
generated_bindings
copy of bindings - exporting via
links
keys in cargo manifests is deprecated
resolves #82