Repository navigation
windows-bindgen clarify filter documentation - #5073
Merged
Merged
Conversation
Co-authored-by: Copilot <[email protected]> Copilot-Session: 3358a444-6117-4cdb-9244-96a7ed6936c2
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The documented examples and behavior align with the filter parser and builder implementation.
0 open findings
What changed in this PR
Clarifies windows-bindgen filtering and provides working generation examples without changing generation logic.
Changes:
- Documents filter syntax, metadata namespaces, dependencies, and options.
- Adds a complete
build.rs/OUT_DIRexample. - Corrects property and event filtering examples.
| File | Description |
|---|---|
docs/crates/windows-bindgen.md |
Reworks the user guide and option reference. |
crates/libs/bindgen/src/lib.rs |
Clarifies builder filter documentation. |
crates/libs/bindgen/src/cli.rs |
Updates CLI options and filter examples. |
crates/libs/bindgen/readme.md |
Adds an end-to-end build-script example. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot <[email protected]> Copilot-Session: 3358a444-6117-4cdb-9244-96a7ed6936c2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The filter examples were pointing at Win32 subsystem namespaces that are not in the bundled metadata. Replace them with working bare and qualified names, and explain how metadata namespaces differ from windows/windows-sys package features. Make automatic dependency inclusion, member filters, and filter files clearer.
Show a complete build.rs/OUT_DIR example in the README, plus matching builder and argument examples and a compact option reference in the guide. Trim the internal implementation notes so the guide stays focused on getting started. Also correct the property/event filter examples in the API docs.
Checked the narrow examples by generating and compiling the bindings, and checked doctests and documentation links. No generation logic changes.
Fixes #4981.