bazelbuild / bazelbuild/rules_rust
Update `crates_vendor` to write any crate `spec` and `annotation` used
- Dominant language
- Starlark
- Stars
- 843
- Forks
- 651
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 15
Description
This would allow external consumers of workspaces that use `crates_vendor` to be programmatically consume the same dependencies.
Concretely, the snippet:
```starlark
crates_vendor(
name = "crates_vendor",
packages = {
"rand": crate.spec(
version = "1",
),
},
annotations = {
"rand": [crate.annotation(
default_features = False,
features = ["small_rng"],
)],
},
mode = "remote",
vendor_path = "crates",
tags = ["manual"],
)
```
To generate some content in the generated `crates.bzl` file:
```starlark
PACKAGES = {
"rand": crate.spec(
version = "1",
),
}
ANNOTATIONS = {
"rand": [crate.annotation(
default_features = False,
features = ["small_rng"],
)],
}
```
Contributor guide
Assessment
This issue has not been assessed yet.