Motivation

Bazel is an open-source build tool that originated within Google. It supports many different programming languages, and its goal is to build large projects with efficiency and reliability.

By enforcing the compilation of all code from source within a strict sandbox environment, Bazel eliminates the classic “it works on my machine” issues caused by operating system and dependency discrepancies between code on different machines, eg. engineering, CI and production.

This cohesive paradigm replaces the fragile, environment-dependent workspace model with a rigorous dependency graph, unlocking advanced capabilities like remote caching and remote execution to drastically accelerate build times while ensuring that tests and binaries are reproducible.

Traditionally, Bazel has been used in large monorepos, but with the introduction Bazel modules it has become considerably easier to use Bazel in smaller, more distributed projects. Many popular projects already have corresponding Bazel modules hosted in the Bazel Central Registry (BCR). The existence of this mechanism makes Bazel an appealing supplementary build system for ROS.

The ROS Central Registry (RCR) is similar to the BCR, acting as a central registry for hosting Bazel build modules for ROS packages. Adding support for an existing or new ROS package is as simple as following our Developer guide and opening up a pull request to this repository.