diff --git a/MODULE.bazel b/MODULE.bazel index 80ebeff6b6..6a6b52f856 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -9,7 +9,7 @@ module( ## Core ############################################################################### -bazel_dep(name = "bazel_features", version = "1.32.0") +bazel_dep(name = "bazel_features", version = "1.36.0") bazel_dep(name = "bazel_skylib", version = "1.8.1") bazel_dep(name = "platforms", version = "1.0.0") bazel_dep(name = "rules_cc", version = "0.2.4") diff --git a/cargo/private/cargo_bootstrap.bzl b/cargo/private/cargo_bootstrap.bzl index 789f299bbd..7524dcf315 100644 --- a/cargo/private/cargo_bootstrap.bzl +++ b/cargo/private/cargo_bootstrap.bzl @@ -1,5 +1,6 @@ """The `cargo_bootstrap` rule is used for bootstrapping cargo binaries in a repository rule.""" +load("@bazel_features//:features.bzl", "bazel_features") load("//cargo/private:cargo_utils.bzl", "get_rust_tools") load("//rust:defs.bzl", "rust_common") load("//rust/platform:triple.bzl", "get_host_triple") @@ -237,6 +238,11 @@ def _cargo_bootstrap_repository_impl(repository_ctx): binary = built_binary, )) + if bazel_features.external_deps.repo_metadata_has_reproducible: + return repository_ctx.repo_metadata(reproducible = True) + + return None + cargo_bootstrap_repository = repository_rule( doc = "A rule for bootstrapping a Rust binary using [Cargo](https://doc.rust-lang.org/cargo/)", implementation = _cargo_bootstrap_repository_impl, diff --git a/rust/repositories.bzl b/rust/repositories.bzl index 8862d8856e..45cdf281aa 100644 --- a/rust/repositories.bzl +++ b/rust/repositories.bzl @@ -103,9 +103,9 @@ def rules_rust_dependencies(): maybe( http_archive, name = "bazel_features", - sha256 = "af3d4fb1cf4f25942cb4a933b1ad93a0ea9fe9ee70c2af7f369fb72a67c266e5", - strip_prefix = "bazel_features-1.21.0", - url = "https://github.com/bazel-contrib/bazel_features/releases/download/v1.21.0/bazel_features-v1.21.0.tar.gz", + sha256 = "9390b391a68d3b24aef7966bce8556d28003fe3f022a5008efc7807e8acaaf1a", + strip_prefix = "bazel_features-1.36.0", + url = "https://github.com/bazel-contrib/bazel_features/releases/download/v1.36.0/bazel_features-v1.36.0.tar.gz", ) maybe(