Skip to content

Conversation

@rex-schilasky
Copy link
Collaborator

@rex-schilasky rex-schilasky commented May 27, 2025

On Linux, Clang defaults to the smallest unsigned type for C enums, which
caused bindgen to emit u32 constants that clash with our i32-based Rust
From/Into implementations. Adding the -fms-compatibility clang_arg instructs
bindgen to use the MSVC enum ABI (signed 32-bit ints), unifying the enum
representation across platforms and resolving the mismatched type errors.

@rex-schilasky rex-schilasky changed the title Update build.rs force signed 32-bit C enums in bindgen May 27, 2025
@genevanmeter
Copy link
Contributor

Unfortunately that did not appear to resolve the issue. I submitted #42 for consideration.

@rex-schilasky rex-schilasky deleted the rex-schilasky-patch-1 branch June 11, 2025 07:52
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.

3 participants