BAZEL AH cover

Google Releases Bazel, Software Building Tool, As Public Beta

September 10, 2015 - Written By Debarshi Nayak

One of the most under-rated yet most useful utility in a software developer’s arsenal would be the Make utility or its equivalent. This system has a set of rules that govern how to build an application from the source files. The Make utility does all the grind job, from reading the rules, to running the compiler and linkers. Google has been using a different version, internally called Blaze. They recently open-sourced a part of it with the anagram Bazel and released it as an open beta to the general public.

According to Google, Bazel is quite different from other systems like Maven, Gradle, Ant, in that it aims to two particular things: build quickly and correctly. Bazel uses caching and parallelism to achieve speeds and utilises a huge repository of shared code base where all software is built from source. It is also useful for extensive testing and release processes. Bazel promises faster loading time, thanks to a selective compiler, which can compile select files instead of the entire code.  As of now, Bazel is only available in Linux and OS X but Google says, support for Windows, and integrating distributed caching is one of their main priorities and will hopefully be released when the product comes out of beta. Engineers can use Bazel to build Java, C++, Python, and Objective-C apps right out of the box. The rule framework codenamed Skylark allows engineers to develop and share their own rules for other platforms and coding languages. Bazel can also be used for building Android and iOS apps, as well as Docker images, and allows the use of libraries from GitHub and Maven.

The American multinational company however agreed that Bazel is not for everyone, and might not be useful for running build operations whose outputs are not meant to be cached, or if there’s direct use of interpreted language. It is encouraging to see Google open-source their tools, given the vast number of robust applications they develop, but this is just ten percent of the whole code. The rest of rest of the rules are Google-specific and hence would be useless for the general public. According to Google, Bazel is mainly targeted at projects that are written in multiple languages, and need an extensive test suite, and also if they have a large codebase that needs support for multiple platforms.