File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -368,6 +368,7 @@ rust_toolchain(
368368 extra_exec_rustc_flags = {extra_exec_rustc_flags},
369369 opt_level = {opt_level},
370370 strip_level = {strip_level},
371+ version = "{version}",
371372 tags = ["rust_version={version}"],
372373)
373374"""
Original file line number Diff line number Diff line change @@ -611,6 +611,7 @@ def _rust_toolchain_impl(ctx):
611611 target_os = target_os ,
612612 target_abi = target_abi ,
613613 target_triple = target_triple ,
614+ version = ctx .attr .version ,
614615 require_explicit_unstable_features = _require_explicit_unstable_features (ctx ),
615616
616617 # Experimental and incompatible flags
@@ -842,6 +843,10 @@ rust_toolchain = rule(
842843 "For more details see: https://docs.bazel.build/versions/master/skylark/rules.html#configurations"
843844 ),
844845 ),
846+ "version" : attr .string (
847+ doc = "The version of the Rust compiler. (E.g. `1.94.1`, nightly/2026-03-26`)" ,
848+ default = "" ,
849+ ),
845850 "_codegen_units" : attr .label (
846851 default = Label ("//rust/settings:codegen_units" ),
847852 ),
You can’t perform that action at this time.
0 commit comments