Successor to Buck: fast graph-based builds for large repos with Starlark rules and remote execution support.
Overview
Buck2 is a build system from Meta designed for large repositories with many languages and tight dependency graphs. It emphasizes short overhead on incremental builds, accurate dependency tracking, and hermetic rules when remote execution is enabled so undeclared inputs fail the build.
Language support is extended through Starlark rules in the prelude rather than hard-coded compiler knowledge in the core binary. Documented user languages include C++, Python, Rust, Haskell, Erlang, OCaml, Java, Kotlin, Go, and more via shared abstractions for testing and querying the graph.
Buck Extension Language introspection lets automation inspect and run actions on the build graph, supporting compilation databases, language servers, and custom tooling. Remote execution follows the same API used by Bazel-compatible farms such as BuildBarn, BuildBuddy, EngFlow, and NativeLink, and the core targets filesystem virtualization for very large trees.
Prebuilt binaries or source builds install the buck2 CLI on supported platforms. The project is used heavily inside Meta on production code while external releases still lack a stable tag, so adopters often track recent builds.
Key features
- Starlark-defined build rules
- Critical-path incremental scheduling
- Hermetic remote execution mode
- Multi-language prelude rules
- BXL graph introspection API
- Remote execution provider compatibility
- Filesystem watch for huge repos
- Distributed compilation support
Use cases
- Monorepos mixing Rust, Python, and C++
- Hermetic CI builds with remote executors
- Generating compilation databases from graphs
- Replacing legacy Buck1 workflows