Hello Bazel users,
Some of you were asking [0] for a simple way to set up a single-node remote execution service, to have a common cache and well-defined execution environment (albeit with only a single execution node). I just wanted to inform you that there is an easy way now. The Justbuild [1] build system provides such a service via a simple subcommand:
just execute --compatible
or with specific ip/port:
just execute --compatible -i 0.0.0.0 -p 8980
Note that the "--compatible" option is required for the Bazel compatibility mode, as Justbuild's native remote execution protocol [2] is an extension on top of Bazel's original protocol:
- using Git hashes, for more efficient handling of Git repositories,
- treating trees as first class citizens, for more efficient remote communication.
This extension could also be appealing for Bazel, as first-class-citizen trees allow for more efficient communication with only one hash instead of a list of hashes being sent (both for input and output artifacts). The Justbuild authors found this saving useful as they anyway decided to never download any artifacts (neither final nor intermediate) unless explicitly requested by the user.
Note that currently Justbuild (both client and the execution server) does not support symlinks yet, but work on the design [3] is ongoing.
Instructions for bootstrapping Justbuild can be found here:
https://github.com/just-buildsystem/justbuild/blob/master/INSTALL.md#bootstrapping-justBinary packages (amd64/arm64) are available for Ubuntu [4]. Tarballs and packages (rpm/deb) with static binaries are available from my private fork [5]. All binaries were bootstrapped from first principles, requiring only a C++ compiler supporting C++20. Debian users might want to have a look at the preliminary source package [6].
Cheers,
Oliver
[0]
https://groups.google.com/g/bazel-discuss/c/5v3R3DTo3s0/m/03gUi8wXAwAJ