Open tthebst opened 1 year ago
From https://github.com/bazelbuild/rules_rust/discussions/1947#discussioncomment-5755216
I don't believe
crate_universe
knows anything about configurations when it resolves dependencies. So the select statement can never be matched. Similar to @rules_rust//crate_universe/src/context/platforms.rs, I would expect aresolve_cfg_rustc_flags
that goes through annotations and findscfg
flags that can be used to enable or disable features. I don't think there will be a way to dynamically enable and disable the dependencies per bazel invocation. Would you be willing to convert this to an Issue? I'd be happy to collaborate on a pull request as well if you'd be open to working on this feature 😄
Im gonna try to knock this out. I have a use case for this, for tokio console.
Enable support for the selection of conditional compilation dependencies.
Discussed in https://github.com/bazelbuild/rules_rust/discussions/1947
Reproduce:
WORKSPACE.bazel
Compile tokio