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
8 changes: 5 additions & 3 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ common --repo_env=CARGO_UNSTABLE_GIT=shallow-deps
common --repo_env=RUSTC_BOOTSTRAP=1
# MODULE.bazel registers only nightly/2026-10-18. Without this, rules_rust
# resolves the stable channel and the build fails closed.
build --@rules_rust//rust/toolchain/channel=nightly
# Hosts can extend this repository profile with their private fleet settings.
build --config=tracedecay
build:tracedecay --@rules_rust//rust/toolchain/channel=nightly
build --incompatible_enable_cc_toolchain_resolution
build --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
build --workspace_status_command=scripts/bazel/workspace_status.sh
Expand Down Expand Up @@ -103,8 +105,8 @@ build "--@rules_rust//rust/settings:per_crate_rustc_flag=external/rules_rust++cr
# workspace-status command and compiler environment take precedence.
build --enable_platform_specific_config

# Private execution pools opt in through .bazelrc.local. Endpoints and host
# capacity belong there; the repository owns execution compatibility.
# Host profiles select compatible execution pools; .bazelrc.local can override
# individual checkouts. Private endpoints and capacity stay outside the repo.
build:rbe-linux --host_platform=//scripts/bazel/platforms:linux_x86_64
build:rbe-linux --platforms=//scripts/bazel/platforms:linux_x86_64
build:rbe-linux --extra_toolchains=@zig_sdk//toolchain:linux_amd64_gnu.2.31
Expand Down
22 changes: 15 additions & 7 deletions docs/remote-execution.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
# Private Bazel execution

Bazel can use a private Remote Execution API service without changing the
repository's ordinary local builds. Put the pool address and capacity in the
checkout's ignored `.bazelrc.local`, which `.bazelrc` imports last:
The repository always expands its `tracedecay` Bazel configuration, which
selects the pinned nightly toolchain. Add the following to the host's
`~/.bazelrc` to extend that profile with private execution settings:

```bazelrc
build --config=rbe-linux
build --remote_executor=grpc://YOUR_PRIVATE_SCHEDULER:50051
build --remote_instance_name=main
build --remote_local_fallback
build:tracedecay --config=rbe-linux
build:tracedecay --config=fleet
build:fleet --remote_executor=grpc://YOUR_PRIVATE_SCHEDULER:50051
build:fleet --remote_cache=grpc://YOUR_PRIVATE_SCHEDULER:50051
build:fleet --remote_instance_name=main
build:fleet --remote_local_fallback
```

Every new TraceDecay worktree inherits this host profile automatically. Other
repositories do not select it. Without a host extension, including under
`--nohome_rc` in CI, the repository still selects nightly and builds locally.
The ignored `.bazelrc.local` remains available for later per-checkout overrides;
command-line options take precedence over rc settings.

Use `rbe-linux` on Linux x86_64 clients, or `rbe-macos` on Apple Silicon macOS
clients. These configurations attach `OSFamily` and `cpu_arch` execution
properties and matching Bazel constraints to the host platform. The scheduler
Expand Down
Loading