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
17 changes: 17 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,13 @@ pip.dep(name = "pytest")
pip.dep(name = "pytest-bazel")
use_repo(pip, "pypi", "rules_python_publish_deps")

# LINT.IfChange(rules_rust_version)
bazel_dep(
name = "rules_rust",
version = "0.73.0",
dev_dependency = TOOL_DEPS_DEV_ONLY,
)
# LINT.ThenChange(:rust_release_linux_sha256s)

rust_crates = use_extension(
"@rules_rust//crate_universe:extensions.bzl",
Expand Down Expand Up @@ -183,6 +185,17 @@ rust.repository_set(
allocator_library = "@rules_rust//rust/private/cc:empty",
edition = "2024",
exec_triple = "x86_64-unknown-linux-gnu",
# known_shas.bzl in rules_rust omits powerpc64le and riscv64gc musl; pin
# them here so rust_toolchain_tools_repository marks every repo in this set
# reproducible and shares it via Bazel's repo contents cache.
# LINT.IfChange(rust_release_linux_sha256s)
sha256s = {
# keep-sorted start
"rust-std-1.97.1-powerpc64le-unknown-linux-musl.tar.xz": "0085770b6613425845ff5bec59d27d38d5cb0c677447936cac8d85872c6c9e59",
"rust-std-1.97.1-riscv64gc-unknown-linux-musl.tar.xz": "3d4b7ca701a24e092f9256c9d68e117d9a7563dbb49013946763077f4f49d66b",
# keep-sorted end
},
# LINT.ThenChange(:rust_release_linux_version)
target_compatible_with = [
"@platforms//cpu:aarch64",
"@platforms//os:linux",
Expand All @@ -192,7 +205,9 @@ rust.repository_set(
# rules_rust 0.73.0's default version; update it with rules_rust. The
# default toolchain builds proc-macros, which rustc only loads if they were
# built by the same version.
# LINT.IfChange(rust_release_linux_version)
versions = ["1.97.1"],
# LINT.ThenChange(:rust_release_windows_version)
)

# Other targets for the same set; the first tag sets the shared attributes.
Expand Down Expand Up @@ -282,7 +297,9 @@ rust.repository_set(
],
target_triple = "i686-pc-windows-msvc",
# See above.
# LINT.IfChange(rust_release_windows_version)
versions = ["1.97.1"],
# LINT.ThenChange(:rules_rust_version)
)

# Another target for the same set; the first tag sets the shared attributes.
Expand Down
4 changes: 4 additions & 0 deletions buildbuddy.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ common:_buildbuddy_base --remote_cache_compression
common:_buildbuddy_base --experimental_remote_cache_chunking
# Automatically rewind and regenerate lost inputs when evicted from remote cache.
common:_buildbuddy_base --rewind_lost_inputs
# Avoid downloading remote build outputs and passing test artifacts during
# `bazel test`; keeps `bazel build` at its `toplevel` default for callers that
# inspect `bazel-bin/`.
test:_buildbuddy_base --remote_download_minimal

# Diagnostic logs for troubleshooting cache misses and gRPC errors
common:_buildbuddy_base --remote_grpc_log=bazel-remote-grpc.log
Expand Down
1 change: 1 addition & 0 deletions tests/workflows/setup_bazel_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ def test_buildbuddy_bazelrc_cache_and_diagnostics():
"common:_buildbuddy_base --remote_cache_compression",
"common:_buildbuddy_base --experimental_remote_cache_chunking",
"common:_buildbuddy_base --rewind_lost_inputs",
"test:_buildbuddy_base --remote_download_minimal",
"common:_buildbuddy_base --remote_grpc_log=bazel-remote-grpc.log",
(
"common:_buildbuddy_base "
Expand Down