Skip to content

Move VARIANT support to the windows crate#3282

Merged
kennykerr merged 9 commits into
masterfrom
windows-variant
Sep 16, 2024
Merged

Move VARIANT support to the windows crate#3282
kennykerr merged 9 commits into
masterfrom
windows-variant

Conversation

@kennykerr

Copy link
Copy Markdown
Collaborator

#2786 added richer support for VARIANT and PROPVARIANT and at the time the only practical way to do that was adding it to the windows-core crate. But that meant that everyone using the windows-core crate carried around VARIANT support even though that's really only meant for some very old Windows APIs in the windows crate. Now that #3110 added a simpler way to handle type extensions, we can more naturally provide this same functionality directly in the windows crate, unburdening the windows-core crate and simplifying the windows-metadata and windows-bindgen crates as well with less "special" type support.

@kennykerr

Copy link
Copy Markdown
Collaborator Author

It's tricky because VARIANT and PROPVARIANT are in different Win32 metadata namespaces. I might have to break the dependency apart and implement them separately.

@ChrisDenton

Copy link
Copy Markdown
Collaborator

This might be a dumb question but do they need to be in a separate namespace? Or is this something that could reasonably be changed?

@kennykerr

kennykerr commented Sep 14, 2024

Copy link
Copy Markdown
Collaborator Author

Yes, that would greatly simplify this. Arguably they should just be together as the two are interdependent APIs.

@kennykerr

Copy link
Copy Markdown
Collaborator Author

It's far from perfect but greatly simplifies windows-core and windows-bindgen and lets me keep pursuing improvements to code generation so it's a step in the right direction.

@kennykerr kennykerr merged commit ff6f56d into master Sep 16, 2024
@kennykerr kennykerr deleted the windows-variant branch September 16, 2024 15:20
pronebird added a commit to nymtech/nym-vpn-client that referenced this pull request Feb 24, 2025
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.

2 participants