bazelbuild / bazelbuild/rules_rust

Expose the `env` attribute of Rust toolchains in the repo rule / bzlmod extension APIs

Open
#3,167 0 comments 0 reactions 0 assignees View on GitHub
needs-design
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.