A dependency for a specific platform can be achieved with e.g.:
[target.'cfg(windows)'.dependencies] foo = "0.1"
A feature-enabled dependency can be achieved with e.g.:
[dependencies.foo] version = "0.1" optional = true [features] feature = ["dep:foo"]
How can you combine both? That is, a dependency that is enabled by default on one platform, but can be enabled on all platforms via a feature?