Cargo Workspace Feature Unification Unexpectedly Enables Dependency Feature
Cargo merges enabled features for shared crates across workspace members.
Runs locally in browser
Free · No login
Independently Verified 2026-11-25
v4.1.0
Identifier: Cargo Workspace Feature Unification Unexpectedly Enables Dependency Feature
Platform: Rust
Common Root Causes:
- Cargo merges enabled features for shared crates across workspace members.
Interactive Diagnostic Checklist
Verified Solutions:
- Set `resolver = "2"` in workspace `Cargo.toml` and keep features strictly additive.
Safe Diagnostic Command:
cargo tree -e features -i <crate>
Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.
Technical Explanation
Cargo merges enabled features for shared crates across workspace members. Recommended diagnostic: `cargo tree -e features -i <crate>`. Remediation: Set `resolver = "2"` in workspace `Cargo.toml` and keep features strictly additive.
Worked Examples
- Run `cargo tree -e features -i <crate>` to verify root cause before applying the remediation.
Limitations & Assumptions
- Always verify configuration changes in staging or with dry-run flags (e.g. `nginx -t`) before reloading production services.
Source References & Verification
Resource ID: err-rust-cargo-feature-unification-conflict · Independently verified: 2026-11-25