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

Smarter filtering for windows-sys generation #2465

Merged
merged 4 commits into from
Apr 20, 2023
Merged

Conversation

kennykerr
Copy link
Collaborator

The existing filtering system involves a hardcoded list of namespaces to exclude. This isn't very manageable, so I've added a simple heuristic that excludes namespaces containing only COM interfaces and interfaces-dependent functions. This excludes many of the same namespaces as before, but also catches many more namespaces that aren't relevant for windows-sys.

In addition to excluding a bunch of unnecessary code gen, it further reduces the overall size of the windows-sys crate.

Before:

Packaged 293 files, 32.3MiB (2.8MiB compressed)

After:

Packaged 233 files, 29.5MiB (2.5MiB compressed)

@kennykerr kennykerr merged commit 7e5cfb4 into master Apr 20, 2023
@kennykerr kennykerr deleted the tool_sys_filter branch April 20, 2023 20:08
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