Buck2
By Meta
Buck2 is Meta's open-source, Rust-based build system, a ground-up rewrite of its original Buck build tool, designed for extremely fast, reliable builds across large multi-language monorepos.
Definition
Buck2 is Meta's open-source, Rust-based build system, a ground-up rewrite of its original Buck build tool, designed for extremely fast, reliable builds across large multi-language monorepos.
Overview
Buck2 succeeds Meta's original Buck build system, rewritten from scratch in Rust to address performance and reliability limitations that Buck's Java-based implementation had reached at Meta's scale. Like Bazel — which itself descends from the same lineage of internal Google tooling that inspired Buck's design — Buck2 organizes a codebase into explicitly declared build targets and constructs a precise dependency graph, enabling fine-grained incremental builds and aggressive caching. Buck2's standout technical feature is its remote execution and caching model, built around a highly concurrent, asynchronous core that keeps the build graph as a first-class, queryable data structure throughout execution rather than a static plan computed once upfront. This lets Buck2 dynamically adjust and re-evaluate parts of the graph as a build progresses, which Meta has cited as a major factor in Buck2 handling their enormous monorepo — spanning multiple languages including C++, Rust, Python, Java, and OCaml — with significantly better performance than the original Buck. Meta open-sourced Buck2 in 2023, and while it shares philosophical DNA with Bazel and Pants, adoption outside Meta has so far been more limited than Bazel's, partly because Buck2's rule ecosystem and documentation are less mature for teams starting from zero. It remains most attractive to organizations already comfortable with Buck-style explicit target declarations, or those specifically drawn to its performance characteristics for very large, polyglot codebases.
Key Features
- Ground-up Rust rewrite of Meta's original Buck build system
- Highly concurrent, asynchronous build graph evaluated dynamically at runtime
- Fine-grained incremental builds with aggressive local and remote caching
- Remote execution support for distributing build actions across a cluster
- Multi-language support including C++, Rust, Python, Java, and OCaml
- Explicit, declarative build target definitions similar to Bazel's BUILD files
- Designed and battle-tested at Meta's extreme monorepo scale
- Open-sourced under an MIT/Apache dual license