bazelbuild / bazelbuild/rules_rust
Expose the `env` attribute of Rust toolchains in the repo rule / bzlmod extension APIs
- Dominant language
- Starlark
- Stars
- 843
- Forks
- 651
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 15
Description
The `env` attribute exists on rust_toolchain:
https://github.com/bazelbuild/rules_rust/blob/5e904830eee39b37775855c6ff7e7e1079eb59e0/rust/toolchain.bzl#L766-L768
However, the common APIs user's use to define toolchains (e.g. the `rust_toolchain_repository` repo rule\[1\], or the tag class used for defining toolchains in the bzlmod extension\[2\]) does not expose the env property.
It would be useful to be able to set this property using the common mechanisms for defining Rust toolchains.
\[1\]: https://github.com/bazelbuild/rules_rust/blob/5e904830eee39b37775855c6ff7e7e1079eb59e0/rust/repositories.bzl#L597
\[2\]: https://github.com/bazelbuild/rules_rust/blob/5e904830eee39b37775855c6ff7e7e1079eb59e0/rust/extensions.bzl#L189
Contributor guide
Assessment
This issue has not been assessed yet.