-
Notifications
You must be signed in to change notification settings - Fork 72
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
Conversation
Signed-off-by: Melvin Wang <[email protected]>
There was a problem hiding this comment.
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
…ocessor_definitions_iter to include_paths, library_paths, and preprocessor_definitions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 19 out of 34 changed files in this pull request and generated 1 comment.
Files not reviewed (15)
- .vscode/settings.json: Language not supported
- crates/wdk-sys/src/input.h: Language not supported
- crates/wdk-sys/src/wdf.c: Language not supported
- .github/workflows/code-formatting-check.yaml: Evaluated as low risk
- .github/workflows/build.yaml: Evaluated as low risk
- examples/sample-umdf-driver/Cargo.toml: Evaluated as low risk
- examples/sample-kmdf-driver/Cargo.toml: Evaluated as low risk
- examples/sample-kmdf-driver/src/lib.rs: Evaluated as low risk
- .github/workflows/codeql.yml: Evaluated as low risk
- Cargo.toml: Evaluated as low risk
- crates/wdk-build/src/bindgen.rs: Evaluated as low risk
- .github/workflows/docs.yaml: Evaluated as low risk
- crates/wdk-sys/Cargo.toml: Evaluated as low risk
- crates/wdk-sys/src/lib.rs: Evaluated as low risk
- .github/workflows/test.yaml: Evaluated as low risk
Comments suppressed due to low confidence (3)
crates/wdk-sys/build.rs:316
- Redundant use of
cfg_if!
macro. Thecfg
attribute is already used within the function.
cfg_if::cfg_if! {
crates/wdk-sys/build.rs:321
- [nitpick] Inconsistent logging using the
trace!
macro. Ensure logging is consistent and only used when necessary.
trace!(header_contents = ?header_contents);
crates/wdk-sys/build.rs:336
- [nitpick] Inconsistent logging using the
trace!
macro. Ensure logging is consistent and only used when necessary.
trace!(bindgen_builder = ?bindgen_builder);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
main change is to add some relevant changes to CONTRIBUTING.md
, everything else is some general questions. great work!
Signed-off-by: Melvin Wang <[email protected]>
This pull request introduces several significant changes to the
wdk-sys
andwdk-build
crates. The main changes include adding headers related to Windows HID support via a newhid
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:
ApiSubset
enum and related methods in theConfig
struct to handle different subsets of APIs required for various driver types. [1] [2] [3] [4]crates/wdk-sys/build.rs
: Added thegenerate_hid
function to generate bindings for HID-related headers and avoid duplicate definitions.crates/wdk-sys/src/hid-input.h
: Added a new header file for HID input with the necessary includes and comments for future improvements.crates/wdk-sys/src/hid.rs
: Added a new source file for HID bindings, including the necessary modules and imports.crates/wdk-sys/src/lib.rs
: Added a new module for HID support, ensuring it is included for all driver models.Kernel Mode Definitions:
crates/wdk-build/src/lib.rs
: Updated theConfig
implementation to include_KERNEL_MODE
definition for both WDM and KMDF driver configurations.Workflow Enhancements:
.github/workflows/build.yaml
,.github/workflows/codeql.yml
,.github/workflows/docs.yaml
,.github/workflows/lint.yaml
,.github/workflows/test.yaml
) to include the--all-features
flag in Cargo commands to ensure all features are built and tested. [1] [2] [3] [4] [5]Breaking Changes:
BREAKING CHANGE:
wdk_default
no longer takes in a list of c header files. Users are expected to specifyheaders
orheader_contents
via their respectivebindgen::Builder
APIsBREAKING CHANGE:
Config::get_include_paths
has been renamed toConfig::include_paths
BREAKING CHANGE:
Config::get_library_paths
has been renamed toConfig::library_paths
BREAKING CHANGE:
Config::get_preprocessor_definitions_iter
has been renamed toConfig::preprocessor_definitions