Open
Description
The cargo docs on workspace packages say (https://doc.rust-lang.org/nightly/cargo/reference/specifying-dependencies.html#inheriting-a-dependency-from-a-workspace):
Along with the workspace key, dependencies can also include these keys:
- optional: Note that the[workspace.dependencies] table is not allowed to specify optional.
- features: These are additive with the features declared in the [workspace.dependencies]
Other than optional and features, inherited dependencies cannot use any other dependency key (such as version or default-features).
Trying this out however, cargo does not seem to mind the default-features
key:
[workspace]
members = ["workspace-member"]
resolver = "2"
[workspace.dependencies]
flate2 = { version = "1.0.35", default-features = false }
url = { version = "2.5.3", features = ["serde"] }
[package]
name = "workspace-member"
version = "0.1.0"
edition = "2021"
[dependencies]
flate2 = { workspace = true, default-features = true }
url = { workspace = true, default-features = false }
It's unfortunately not clear to me from the docs if default-features
are inherited.