Skip to content
Open
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
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
6 changes: 3 additions & 3 deletions rust/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down