Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
6 changes: 6 additions & 0 deletions cargo/private/cargo_bootstrap.bzl
Original file line number Diff line number Diff line change
@@ -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")
Expand Down Expand Up @@ -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,
Expand Down