cargo

Rust Feature unification and resolver

Cargo normally combines feature requests for the same resolved dependency within a compilation context. Resolver 2 separates certain build, development and target-specific cases; resolver 3 retains those feature rules and changes the default handling of incompatible Rust versions. A virtual workspace must set its resolver explicitly. Example format: shell; run from a disposable copy of v15/fixtures/projects/feature-app. Expected result (not executed): The tree shows the enabled label feature relationship; exact text varies. Why: The feature graph explains why optional code is enabled. Common mistake: Expecting one consumer to turn off a feature that another consumer enables.

Formal Syntax & Structure

rust syntaxrust
resolver = "3"; cargo tree -e features

Working Example

Example Snippetrust
cargo tree --offline -e features
Rust Reference