Closed
Description
Implementation: #7820
Documentation: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#features
Summary
-Z features=itarget
causes the feature resolver to ignore features for target-specific dependencies for targets that don't match the current compile target. For example:
[dependency.common]
version = "1.0"
features = ["f1"]
[target.'cfg(windows)'.dependencies.common]
version = "1.0"
features = ["f2"]
When building this example for a non-Windows platform, the f2
feature will not be enabled.
Unresolved issues
- Update
cargo metadata
- Does this cause existing projects to fail?
- Projects can add missing features as a backwards-compatible workaround. However, if it causes problems for too many projects, we may need to find some way to opt-in.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done