Skip to content

windows-bindgen remove variant overrides - #4747

Merged
Kenny Kerr (kennykerr) merged 1 commit into
masterfrom
bindgen-invariant
Jul 25, 2026
Merged

windows-bindgen remove variant overrides#4747
Kenny Kerr (kennykerr) merged 1 commit into
masterfrom
bindgen-invariant

Conversation

@kennykerr

Copy link
Copy Markdown
Collaborator

These are no longer required.

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.

Pull request overview

Removes previously hard-coded bindgen overrides by switching D2D_VECTOR_3F to the existing Numerics remap path and deleting now-redundant VARIANT/PROPVARIANT special-casing in bindgen’s struct codegen. This aligns Win32 projection output with the established Windows.Foundation.Numerics substitutions used throughout the windows crate.

Changes:

  • Remove the locally-defined D2D_VECTOR_3F Win32 struct from the windows crate projection output.
  • Add a bindgen remap from D2D_VECTOR_3F -> Windows.Foundation.Numerics.Vector3 (matching existing Vector2/Vector4 behavior).
  • Delete unused VARIANT/PROPVARIANT overrides and constants in bindgen codegen.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
crates/libs/windows/src/Windows/Win32/dcommon/mod.rs Drops the D2D_VECTOR_3F struct definition from the Win32 projection output.
crates/libs/bindgen/src/types/mod.rs Adds D2D_VECTOR_3F -> Windows.Foundation.Numerics.Vector3 remap alongside existing Numerics substitutions.
crates/libs/bindgen/src/types/cpp_struct.rs Removes VARIANT/PROPVARIANT special-case logic in clone/copyability decisions.
crates/libs/bindgen/src/type_name.rs Removes now-unused TypeName::VARIANT and TypeName::PROPVARIANT constants.

@kennykerr
Kenny Kerr (kennykerr) merged commit 71503ce into master Jul 25, 2026
37 checks passed
@kennykerr
Kenny Kerr (kennykerr) deleted the bindgen-invariant branch July 25, 2026 21:12
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