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

Simplify internal windows-bindgen caching #3427

Merged
merged 4 commits into from
Jan 8, 2025
Merged

Simplify internal windows-bindgen caching #3427

merged 4 commits into from
Jan 8, 2025

Conversation

kennykerr
Copy link
Collaborator

@kennykerr kennykerr commented Jan 8, 2025

The windows-bindgen crate uses an internal static winmd reader but passing it around constantly is rather cumbersome. This simplifies this by using a static AtomicPtr that can be retrieved via the reader free function. This then helps to simplify some upcoming refactoring and bug fixing.

I ended up doing the same for Config which is similarly passed around and describes what and how to generate bindings from metadata.

@kennykerr kennykerr changed the title Simpler static reader caching Simplify internal windows-bindgen caching Jan 8, 2025
@kennykerr
Copy link
Collaborator Author

Seems like spurious IO failures are sporadically failing tests.

@kennykerr kennykerr merged commit ffb9078 into master Jan 8, 2025
75 checks passed
@kennykerr kennykerr deleted the static-reader branch January 8, 2025 21:22
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