Need advice about which tool to choose?Ask the StackShare community!
Bazel vs Buck: What are the differences?
Bazel: Correct, reproducible, fast builds for everyone. Bazel is a build tool that builds code quickly and reliably. It is used to build the majority of Google's software, and thus it has been designed to handle build problems present in Google's development environment; Buck: A build system developed and used by Facebook. Buck encourages the creation of small, reusable modules consisting of code and resources, and supports a variety of languages on many platforms.
Bazel and Buck can be primarily classified as "Java Build" tools.
Some of the features offered by Bazel are:
- Multi-language support: Bazel supports Java, Objective-C and C++ out of the box, and can be extended to support arbitrary programming languages.
- High-level build language: Projects are described in the BUILD language, a concise text format that describes a project as sets of small interconnected libraries, binaries and tests. By contrast, with tools like Make you have to describe individual files and compiler invocations.
- Multi-platform support: The same tool and the same BUILD files can be used to build software for different architectures, and even different platforms. At Google, we use Bazel to build both server applications running on systems in our data centers and client apps running on mobile phones.
On the other hand, Buck provides the following key features:
- Speed up your Android builds. Buck builds independent artifacts in parallel to take advantage of multiple cores. Further, it reduces incremental build times by keeping track of unchanged modules so that the minimal set of modules is rebuilt.
- Introduce ad-hoc build steps for building artifacts that are not supported out-of-the-box using the standard Ant build scripts for Android.
- Keep the logic for generating build rules in the build system instead of requiring a separate system to generate build files.
Bazel and Buck are both open source tools. Bazel with 12.2K GitHub stars and 2K forks on GitHub appears to be more popular than Buck with 6.77K GitHub stars and 1.01K GitHub forks.
Pros of Bazel
- Fast28
- Deterministic incremental builds20
- Correct17
- Multi-language16
- Enforces declared inputs/outputs14
- High-level build language10
- Scalable9
- Multi-platform support5
- Sandboxing5
- Dependency management4
- Windows Support2
- Flexible2
- Android Studio integration1
Pros of Buck
- Fast4
- Java1
- 1
- Runs on OSX1
- Windows Support1
Sign up to add or upvote prosMake informed product decisions
Cons of Bazel
- No Windows Support3
- Bad IntelliJ support2
- Poor windows support for some languages1
- Constant breaking changes1
- Learning Curve1
- Lack of Documentation1
Cons of Buck
- Lack of Documentation2
- Learning Curve1