bazel
AGENTS.md26k starsChanged 3 months agoApache-2.0View on GitHub
Welcome to the Bazel repository. This document provides essential context and workflows for working with the Bazel codebase. To build Bazel from source, use a pre-installed bazel or bazelisk binary. * Remote Execution: If you have access to a Remote Build Execution (RBE) cluster, use --config=remote to significantly speed up your builds: To test changes safely without interfering with your primary workspace, use a separate binary and output base: Note: Using a custom --output_base (e.g., /tmp/ob-dev) is crucial to avoid…
Trending
More talk lately.about the whole repository
Who's talking about bazelbuild/bazel
- Basic Computational Tools“How to Build Bazel on Windows”YouTube · Dec 14, 2016 · 12k views
- vlogize“Installing Bazel on Windows”YouTube · Mar 2, 2024 · 985 views
- 迷途小书童的Note“源码编译tensorflow-2.2.0,支持GPU,CUDA-10.1、cuDNN-7.6、bazel-2.0.0、protobuf-3.11.4,超详细,全网最新,呕心之作”YouTube · May 22, 2020 · 468 views
- Microsoft Développeurs France“Bazel - Tartine & Tech”YouTube · May 21, 2021 · 297 views
- A Hacker News story“Bazel Release 1.0”Hacker News · Oct 10, 2019 · 263 points
The biggest 5 of 53 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 53
Talked about on Stack Overflow, Hacker News, GitHub, YouTube, Bluesky and the web (53 times).
On Stack Overflow · 29
- Feb 5, 2019Tensorflow Compile Runs For A Long Time58 votes · 2 answers
- May 29, 2018Bazel Key Expired Error when sudo apt-get update Ubuntu 16.0434 votes
- Nov 30, 2015How do I get the commands executed by Bazel29 votes
- May 24, 2020Cannot install bazel on Ubuntu 20.04 - invalid EXPKEYSIG20 votes
- Feb 8, 2019Xamarin.Android binding invalid opcode20 votes
24 more on Stack Overflow
- May 29, 2018Tensorflow: Cuda compute capability 3.0. The minimum required Cuda capability is 3.516 votes
- Jun 12, 2017How to understand Bazel's output time?13 votes · 1 answer
- Dec 21, 2017Building a simple library with bazel, fixing include path10 votes
- Oct 26, 2018Why does Bazel do a full rebuild whenever switching between IntelliJ and command-line?7 votes · 1 answer
- Sep 13, 2018Bazel build behind proxy7 votes
- Jul 17, 2017Error with keystore apk unity7 votes
- Oct 24, 2021Create a fully static C++ binary in Bazel6 votes
- Jan 29, 2019Bazel and py_test in sandbox - any way to define outputs?6 votes · 2 answers
- Dec 20, 2018Isolate Bazel C++ build from system include directories6 votes
- Jul 24, 2018bazel: why do targets keep increasing if build graph is known6 votes
- Jun 28, 2018bazel: Using WSL's bash instead of MSYS646 votes
- May 23, 2021How to run mediapipe with c++ on M1 mac5 votes · 1 answer
- Sep 18, 2019How does Bazel track files so quickly?5 votes
- Nov 9, 2017Idiomatic retrieval of the Bazel execution path5 votes
- Nov 2, 2017How can users get bazel-run.sh?5 votes · 1 answer
- Oct 6, 2017Missing dependencies when building @com_google_protobuf//:protobuf_lite5 votes
- Jul 25, 2017Build C++ code with Circular dependency using Bazel Build System5 votes
- Dec 7, 2021How to stop bazel from relying on Python24 votes
- May 2, 2020Bazel: Mixing a Linux remote execution platform with a Mac OS local platform4 votes · 1 answer
- Apr 20, 2020Bazel Monorepo - How Rebuild and Publish only Changed Docker Images?4 votes
- Jan 3, 2020CalledProcessError while installing Tensorflow using Bazel4 votes
- Jan 15, 2019how to set Bazel --warn_duplicate_resources flag in java rules?4 votes
- Apr 17, 2018Bazel: How to access workspace status variables in Skylark?4 votes
- Feb 8, 2016tensorflow build fails with "missing dependency" error4 votes
On Hacker News · 9
- Oct 10, 2019Bazel Release 1.0263 points · 174 comments
- Dec 9, 2024Bazel 8.0137 points · 46 comments
- Dec 14, 2021Why Bazel is written in Java15 points
- Dec 26, 2025Bazel Central Registry SSL certificate expired, breaking Bzlmod builds8 points · 1 comment
- Sep 16, 2015Bazel: Google's internal build system, now open-sourced8 points · 1 comment
4 more on Hacker News
- Dec 11, 2023Bazel 7.0 LTS2 points
- Dec 19, 2022Bazel 6.0.02 points
- Jan 21, 2026Bazel 9.0.0 Release1 point
- Sep 18, 2015Google Bazel {Fast, Correct} – Choose Two1 point
On GitHub · 8
- Jul 21, 2020Connecting Bazel and JUnit5 by BazelJUnit5ConsoleLauncher — junit-team/junit-examples57 reactions · 22 comments
- Sep 26, 2017Allow installing older Bazel versions from the custom Bazel APT repository — bazelbuild/continuous-integration34 reactions · 14 comments
- Aug 28, 2020test and build infrastructure for arm64 support — grpc/grpc31 reactions · 9 comments
- Sep 11, 2017bazel compiliation is broken! build failure due to github checksums changing — tensorflow/tensorflow30 reactions · 17 comments
- Dec 19, 2025Add local_includes to cc_library / cc_binary — bazelbuild/rules_cc11 reactions · 18 comments
3 more on GitHub
- Jan 22, 2022bazel_5: init at 5.0.0 — NixOS/nixpkgs8 reactions · 6 comments
- Nov 6, 2022[WIP][POC] Starlark implementation of kt_android_* rules — bazel-contrib/rules_kotlin7 reactions · 3 comments
- Feb 11, 2019bazel: initial support for cross-compilation — kubernetes/kubernetes7 reactions · 29 comments
On YouTube · 5
- Dec 14, 2016How to Build Bazel on Windows — Basic Computational Tools12k views · 32 comments
- Mar 2, 2024Installing Bazel on Windows — vlogize985 views
- May 22, 2020源码编译tensorflow-2.2.0,支持GPU,CUDA-10.1、cuDNN-7.6、bazel-2.0.0、protobuf-3.11.4,超详细,全网最新,呕心之作 — 迷途小书童的Note468 views · 4 comments
- May 21, 2021Bazel - Tartine & Tech — Microsoft Développeurs France297 views
- May 21, 2026Bazel's Golden Age: 2,730 Commits Visualized in 60s! 🚀 — CodeTimelapse25 views
On Bluesky · 1
- May 3, 2024📦 bazelbuild / bazel ⭐ 22,343 (+5) 🗒 Java a fast, scalable, multi-language and extensible build system — @github-trending.bsky.social1 likes and repost
On the web · 1
- Nov 3, 2026bazel (bazelbuild): a fast, scalable,… · Review | GitRank — gitrank.cc
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,439 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
Remote Execution: If you have access to a Remote Build Execution (RBE) cluster, use --config=remote to significantly speed up your builds:
- Distinctive: line 44
If you modify a file, find tests that transitively depend on it:
- Very specific: line 72
Starlark: Use buildifier for BUILD and .bzl files.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Bazel Codebase Guide for Gemini
Welcome to the Bazel repository. This document provides essential context and workflows for working with the Bazel codebase.
🏗️ Building & Running Bazel
To build Bazel from source, use a pre-installed bazel or bazelisk binary.
- Fast Iteration Build (Recommended):
bazel build //src:bazel-dev - Standard Build:
bazel build //src:bazel
⚡ Performance Tips
- Remote Execution: If you have access to a Remote Build Execution (RBE)
cluster, use
--config=remoteto significantly speed up your builds:bazel build --config=remote //src:bazel-dev
🔄 Iterative Development Workflow
To test changes safely without interfering with your primary workspace, use a separate binary and output base:
- Build and Copy:
bazel build //src:bazel-dev && cp bazel-bin/src/bazel-dev /tmp/bazel - Run commands:
/tmp/bazel --output_base=/tmp/ob-dev <command>
Note: Using a custom --output_base (e.g., /tmp/ob-dev) is crucial to
avoid locking your main workspace server and ensures your development
environment remains isolated.
🧪 Testing
Tests are located primarily in src/test.
Finding Relevant Tests
If you modify a file, find tests that transitively depend on it:
bazel query "rdeps(//src/test/..., path/to/file.java)"Running Tests
- Unit Tests: Typically
java_testtargets. - Integration Tests:
- Java-based: Subclasses of
BuildIntegrationTestCase. - Shell-based: Located in
src/test/shell, using a bash test framework.
- Java-based: Subclasses of
📜 Architecture & Codebase
Bazel uses a Client/Server architecture. The client (C++) is a lightweight wrapper that starts and communicates with a long-lived Java server.
- Skyframe: The incremental evaluation framework. Most core logic is
implemented as
SkyFunctions evaluatingSkyKeys intoSkyValues. - Starlark: The configuration language used for
BUILDand.bzlfiles. - Loading/Analysis/Execution: The three phases of a Bazel command.
For architectural details or introspection capabilities,
see: docs/contribute/codebase.mdx
🧹 Linting & Formatting
- Java: Follows Google Java Style.
- Starlark: Use
buildifierforBUILDand.bzlfiles.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

