bazelbuild / bazelbuild/rules_rust
How to control features in crate_universe for all crates?
- Dominant language
- Starlark
- Stars
- 843
- Forks
- 651
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 15
Description
This one is a challenge and probably has some additional neuances
Lets say we have a `crate.spec` like so:
```python
"reqwest": crate.spec(
version = "=0.12.*",
default_features = False,
features = [
"blocking",
"json",
"rustls-tls",
"gzip",
"brotli",
"deflate",
],
),
```
A developer later adds a dependency that depends (potentially indirectly) on `reqwest` say `rustify`.
`rustify` pulls in `reqwest` with `default_features` (or conflicting features)
We then end up with a dependency graph like so:

which is problematic given that is not what was specified in the deps, and seems to be counter to what cargo.toml does
Contributor guide
Assessment
This issue has not been assessed yet.