Skip to content

windows-bindgen clarify filter documentation - #5073

Merged
Kenny Kerr (kennykerr) merged 3 commits into
masterfrom
bindgen-filter-docs
Oct 12, 2026
Merged

Kenny Kerr (kennykerr) merged 3 commits into
masterfrom
bindgen-filter-docs

Conversation

@kennykerr

Copy link
Copy Markdown
Collaborator

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 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_DIR example.
  • 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
@kennykerr
Kenny Kerr (kennykerr) merged commit 000e2ad into master Oct 12, 2026
37 checks passed
@kennykerr
Kenny Kerr (kennykerr) deleted the bindgen-filter-docs branch October 12, 2026 16:54
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.

document filter syntax and usage

2 participants