Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: expand wdk-sys coverage to include hid-related headers #260

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

wmmc88
Copy link
Collaborator

@wmmc88 wmmc88 commented Jan 11, 2025

This pull request introduces several significant changes to the wdk-sys and wdk-build crates. The main changes include adding headers related to Windows HID support via a new hid feature, and laying the groundwork for future features to be added to further expand API coverage. Bindgen input has moved from a static input header to a dynamically generated header passed to bindgen's header_contents method, allowing for the inputs to more easily be adaptable to different cargo features.

HID Support:

Kernel Mode Definitions:

  • crates/wdk-build/src/lib.rs: Updated the Config implementation to include _KERNEL_MODE definition for both WDM and KMDF driver configurations.

Import Reordering:

Breaking Changes:

BREAKING CHANGE: wdk_default no longer takes in a list of c header files. Users are expected to specify headers or header_contents via their respective bindgen::Builder APIs

@wmmc88 wmmc88 requested a review from Copilot January 11, 2025 00:00
@wmmc88 wmmc88 self-assigned this Jan 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 14 out of 28 changed files in this pull request and generated no comments.

Files not reviewed (14)
  • .vscode/settings.json: Language not supported
  • crates/wdk-sys/src/input.h: Language not supported
  • crates/wdk-sys/src/wdf.c: Language not supported
  • tests/umdf-driver-workspace/crates/driver_1/src/lib.rs: Evaluated as low risk
  • examples/sample-kmdf-driver/src/lib.rs: Evaluated as low risk
  • tests/umdf-driver-workspace/crates/driver_2/src/lib.rs: Evaluated as low risk
  • examples/sample-umdf-driver/src/lib.rs: Evaluated as low risk
  • tests/mixed-package-kmdf-workspace/crates/driver/src/lib.rs: Evaluated as low risk
  • crates/wdk-build/src/bindgen.rs: Evaluated as low risk
  • Cargo.toml: Evaluated as low risk
  • crates/wdk-sys/src/lib.rs: Evaluated as low risk
  • crates/wdk-sys/Cargo.toml: Evaluated as low risk
  • crates/wdk-build/Cargo.toml: Evaluated as low risk
  • examples/sample-wdm-driver/Cargo.toml: Evaluated as low risk
@@ -31,6 +31,9 @@ wdk-sys = { path = "../../crates/wdk-sys", version = "0.3.0" }

[features]
default = []

hid = ["wdk-sys/hid"]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--all-features should probably be passed to all the CI jobs for now. Eventually, we should probably use something like cargo-hack for more thorough testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant