Hubbry Logo
search
logo
331265

Bazel (software)

logo
Community Hub0 Subscribers
Write something...
Be the first to start a discussion here.
Be the first to start a discussion here.
See all
Bazel (software)

Bazel (/ˈbzəl/) is a free and open-source software tool used for the automation of building and testing software.

Similar to build tools like Make, Apache Ant, and Apache Maven, Bazel builds software applications from source code using rules. Rules and macros are created in the Starlark language, a dialect of Python. There are built-in rules for building software written in Java, Kotlin, Scala, C, C++, Go, Python, Rust, JavaScript, Objective-C, and bash scripts. Bazel can produce software application packages suitable for deployment for the Android and iOS operating systems.

In 2006, Google started the development of a build tool called Blaze. The motivation was to have a build system that provides both speed and correctness in a large monorepo.

Bazel was created as an open-source port of Blaze, using its anagram as a name. Bazel was first released in March 2015 and entered beta by September 2015. Version 1.0 was released in October 2019.

Bazel has been described as "one of the first openly available cloud build systems". It is able to save the history of previously run commands and share the results across multiple users. To do so, Bazel requires that the inputs and outputs of build targets are fully specified.

Bazel is extensible with the Starlark programming language. Starlark is an embedded language whose syntax is a subset of the Python syntax. However, it doesn't implement many of Python's language features, such as the ability to access the file I/O, in order to avoid extensions that could create side-effects or create build outputs not known to the build system itself. Such side-effects could potentially lead to incorrect analysis of the build dependency graph.

Bazel was designed as a multilanguage build system. It is able to build software combining multiple programming languages within the same repository.

Many commonly used build systems are designed with a preference for a specific programming language. Examples of such systems include Ant and Maven for Java, Leiningen for Clojure, sbt for Scala, etc. In a repository with multiple languages, combining separate build systems and achieving the build speed and correctness benefits described above can be difficult and problematic.

See all
User Avatar
No comments yet.