Add support for extra rustc environment variables (#3510) This adds support for injecting environment variables into rustc invocations via build settings: - `//rust/settings:extra_rustc_env` for the target configuration - `//rust/settings:extra_exec_rustc_env` for the exec configuration These settings can be set from the command line with flags like: ``` --@rules_rust//rust/settings:extra_rustc_env=RUSTC_BOOTSTRAP=1 ``` This mirrors how extra rustc flags are handled and enables build-wide env-based feature control without editing individual rules. Useful for enabling unstable features across many crates, or toggling behavior in proc macros and build scripts.
This repository provides rules for building Rust projects with Bazel.
General discussions and announcements take place in the GitHub Discussions, but there are additional places where community members gather to discuss rules_rust.
Please refer to the full documentation.