Extending Bazel to Its Full Potential
Modern-day build systems are just as diverse and dynamic as the many programming languages out there. While build systems are developed for a wide assortment of workflows and use cases, there are three universal expectations from end users: such a system must be fast, correct, and well-optimized.
Some build systems meet these expectations, but few are specifically built from the ground up to fulfill these expectations in a single stroke.
Introducing Bazel
Bazel, first released in 2015, is the open source version of Google’s Blaze build system. Blaze started development in 2006 as a way to unify Google’s growing codebase. Google famously keeps the vast majority of its code in a single repository, otherwise known as a monorepo. This repo contains almost every project in Google, allowing any Google engineer to build any Google project with a single command. Such a build system is required to be fast, scale with the number of developers using it, and, most importantly, produce identical builds regardless of the builder’s machine.
Blaze was the answer. Google designed Blaze for fast, correct builds. By using a distributed cache, Blaze scales with the number of developers using it, condensing build times from days to hours, and from hours to minutes. While ideal for a monorepo, Blaze works just as well for projects composed of many different repos.
By 2014, after Blaze had become quite popular with its own developers, Google decided to make it ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access