Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions rust/private/repository_utils.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ rust_toolchain(
extra_exec_rustc_flags = {extra_exec_rustc_flags},
opt_level = {opt_level},
strip_level = {strip_level},
version = "{version}",
tags = ["rust_version={version}"],
)
"""
Expand Down
5 changes: 5 additions & 0 deletions rust/toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,7 @@ def _rust_toolchain_impl(ctx):
target_os = target_os,
target_abi = target_abi,
target_triple = target_triple,
version = ctx.attr.version,
require_explicit_unstable_features = _require_explicit_unstable_features(ctx),

# Experimental and incompatible flags
Expand Down Expand Up @@ -842,6 +843,10 @@ rust_toolchain = rule(
"For more details see: https://docs.bazel.build/versions/master/skylark/rules.html#configurations"
),
),
"version": attr.string(
doc = "The version of the Rust compiler. (E.g. `1.94.1`, nightly/2026-03-26`)",
default = "",
),
"_codegen_units": attr.label(
default = Label("//rust/settings:codegen_units"),
),
Expand Down
Loading