windows target and only if the feature special was set?
I have multiple targets dependencies (macOS / Windows / Linux), not sure how can I have windows only feature in my own crate
Update:
Does that works?
[target.'cfg(target_os = "macos")'.dependencies]
some_macos_dep = { ... }
[target.'cfg(target_os = "windows")'.dependencies]
windows = { ..., optional = true }
[features]
example_feature = ["windows"] # use windows crate if example_feature was set
It works but not for feature condition, check this
Обсуждают сегодня