i can't seem to find any documentation about this anywhere ... so i'll ask here:
is it possible, in my project's Cargo.toml
, to enable a feature or optional dependency conditional on multiple other features? for example, say i have:
[features]
2d = [
"bevy",
# i want this only if `physics` is also enabled!
"heron/2d",
]
3d = [
"bevy"
# i want this only if `physics` is also enabled!
"heron/3d",
]
physics = [ "heron" ]
[dependencies.heron]
version = "2.0.1"
optional = true
[dependencies.bevy]
version = "0.6"
optional = true
the problem is that, when specified like this, enabling my 2d
or 3d
feature without my physics
feature, also pulls in heron
!
i want 2d
to only pull in bevy, but 2d
+ heron
to also pull in heron and enable the additional 2d
feature on heron
.
i've been digging through cargo documentation and haven't found any solution; help?