Configure Bazel Remote Build Execution (RBE) to distribute build and test actions

domain: bazel.build · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Select an RBE backend that implements the Remote Execution API (REAPI): BuildBuddy, Engflow, and Google Cloud's Remote Build Execution service are common options; each provides a grpcs:// endpoint
  2. Add execution flags to .bazelrc: build --remote_executor=grpcs://YOUR_RBE_ENDPOINT --remote_cache=grpcs://YOUR_RBE_ENDPOINT --remote_timeout=600
  3. Define a platform target in your BUILD file specifying the remote execution container image and OS constraints, then reference it with build --remote_execution_properties or --platforms=//path/to:platform
  4. Configure toolchains so the remote executor finds compilers at the same paths used in the platform image; for C++ this typically means registering a hermetic LLVM or GCC toolchain via register_toolchains in WORKSPACE
  5. Set build --jobs=50 (or higher) to leverage RBE parallelism; with remote execution, builds are no longer bounded by local CPU cores
  6. Authenticate by passing a token or service account credentials via --remote_header=x-buildbuddy-api-key=YOUR_KEY or a credentials JSON file, depending on the provider

Known gotchas

Related routes

Set up a Bazel remote cache backed by a gRPC or HTTP server
bazel.build · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans