Skip to content

Allow marking individual global bitfield enums#3342

Open
dcoles wants to merge 1 commit intorust-lang:mainfrom
dcoles:bitfield-global-enum
Open

Allow marking individual global bitfield enums#3342
dcoles wants to merge 1 commit intorust-lang:mainfrom
dcoles:bitfield-global-enum

Conversation

@dcoles
Copy link

@dcoles dcoles commented Jan 31, 2026

While it's possible to use default_enum_style to get bitfield global enums, this implements bitfield operations for all default enums.

This new option allows creating global bitfield enums on a per-type basis similar to the behaviour of newtype_global_enum.

As a workaround, in the Flipper Zero Rust crate we currently implement bitfield operations by hand. It would be nice if this could be done using through bindgen configuration.

While it's possible to use `default_enum_style` to get bitfield global enums,
this implements bitfield operations for all default enums.

This new option allows creating global bitfield enums on a per-type basis
similar to the behaviour of `newtype_global_enum`.
@dcoles
Copy link
Author

dcoles commented Jan 31, 2026

Checking the CI test results:

  • Clippy test failure is due to missing documentation in bindgen/features.rs, which is not touched by this PR.
  • macos-latest test seems to be failing due to missing _libiconv symbol, which is unlikely related to this PR.

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