Skip to main content
At the highest level, Bazel’s core model is:

Bazel input requirements

To build your application with Bazel, you must provide two core requirements: Code Descriptions Provide a description of your code and its dependencies in BUILD files. You’ll see that these can be largely automated, but they are checked into version control, and developers sometimes need to read or edit them. Rule-sets Bazel requires plugins called a rule set to teach it what to do with those descriptions you provided in the BUILD files. These rules, in turn, know how to fetch existing build tools like compilers or code generators.
Rarely, a team exclusively generates BUILD files on-the-fly; we call this setup “BUILDless” since they don’t check them in.

Bazel build output

Provided with BUILD files, Bazel constructs a dependency graph. It uses that to create a lazy transformation from your source tree to a bazel-out/ folder containing the requested build outputs. Test results are modeled as outputs too. The output folder is then continually updated as the sources are changed, by doing as little work as possible.
Check out a detailed article on Bazel outputs