Skip to content

feat: gate primitives behind feature flags - #157

Merged
tisonkun merged 2 commits into
mainfrom
codex/primitive-feature-flags
Aug 19, 2026
Merged

feat: gate primitives behind feature flags#157
tisonkun merged 2 commits into
mainfrom
codex/primitive-feature-flags

Conversation

@tisonkun

Copy link
Copy Markdown
Member

Summary

  • Make every public primitive module an opt-in Cargo feature and keep default = [].
  • Encode feature dependencies between composite primitives and make hashbrown optional for the once and singleflight paths.
  • Gate shared internal modules, tests, docs, and benchmarks so zero-feature, individual-feature, and all-feature builds remain clean.
  • Add an xtask/CI feature matrix modeled after DataSketches Rust and document feature selection for users.

Breaking changes

  • Downstream users must explicitly enable every primitive they use.
  • Raise the MSRV from Rust 1.85.0 to 1.86.0, matching the cargo_metadata version used by the feature-matrix tooling.

Validation

  • cargo x check
  • cargo x test
  • cargo +1.86.0 x test
  • cargo x lint
  • cargo x build --locked

Closes #102.

Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
@tisonkun
tisonkun merged commit 524d5f1 into main Aug 19, 2026
10 checks passed
@tisonkun
tisonkun deleted the codex/primitive-feature-flags branch August 19, 2026 05:29
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.

Add feature flags for each primitives

1 participant