flag-frenzy is an advanced feature flag testing tool for Cargo, perfect for large projects and continuous integration. It checks combinations of feature flags for crates within a workspace, filtering them by configurable rules.
You may be interested in these great, simpler alternatives:
flag-frenzy was created to test feature flags for crates within the Bevy game engine. Originally it was a Github Actions job that ran cargo-all-features (source), but quickly issues arose with out-of-memory errors and insufficient feature configuration.
The flag-frenzy you know of today was written from scratch with the previous section's issues in mind. Specifically, it offers:
- Lazy combinations with
Iterator- Since combinations are exponential, you would run out of memory if you tried to compute them all ahead of time. Instead,
flag-frenzyuses anIteratorto only compute a combination when it is needed, and drops the value when it is done.
- Since combinations are exponential, you would run out of memory if you tried to compute them all ahead of time. Instead,
- Expressive feature configuration with rules
- Easily express complex feature requirements, such as: "
feature1requiresfeature2orfeature3" and "feature4andfeature5are incompatible, unlessfeature6is enabled." - This allows you to test only unintended behavior with feature flags, and skip the combinations that you intended to not work.
- Easily express complex feature requirements, such as: "
- Split up work into chunks that can be distributed across multiple processes in parallel.
- This was re-implemented from
cargo-all-featuresbecause it drastically decreases the time required is check a workspace. - Note that this is on a best-effort basis: individual crates cannot be subdivided, and it does not account for rules and other filters. See #14 for more information.
- This was re-implemented from
- Colorful output and failure reports that help diagnose exactly which combinations raise errors.
Please see the documentation!
- #14298
bevy_windowfailing withserializefeature. - #14430
bevy_uifailing withoutbevy_text. - #14469
bevy_winitfailing withoutserializefeature. - #14486
bevy_gltffailing withpbr_multi_layer_material_texturesorpbr_anisotropy_texture. - #14736
bevy_dev_toolsfailing withoutbevy_gizmosenabling itsbevy_renderfeature. - #15515
bevyfailing withspirv_shader_passthroughfeature.