#resolver 2 and OS-specific features for dependency

3 messages · Page 1 of 1 (latest)

main bobcat
#

according to https://doc.rust-lang.org/cargo/reference/resolver.html#feature-resolver-version-2

this kind of a configuration should work, right?

[target.'cfg(target_os = "macos")'.dependencies.skia-safe]
version = "0.75.0"
features = ["metal"]

[target.'cfg(target_os = "windows")'.dependencies.skia-safe]
version = "0.75.0"
features = ["d3d"]

it seems to include both "d3d" and "metal" features on macos on this case though. what am i missing?

#

i'm definitely using resolver 2

#

alright, solved this by specifying the resolver in the workspace root Cargo.toml file