Skip to main content

Introduction

Welcome to Buck2, a large scale, fast, reliable, and extensible build tool developed and used by Meta. Buck2 supports a variety of languages on many platforms.

Buck2's core is written in Rust. Starlark, which is a deterministic, immutable dialect of Python, is used to extend the Buck2 build system, enabling Buck2 to be language-agnostic. With Starlark, users can define their own custom rules.

Buck2 leverages the Bazel spec of Remote Build Execution as the primary means of parallelization and caching, which increases the importance of idempotency (no matter how many times an operation is performed, it yields the same result) and hermeticity (code is sealed off from the world), giving the right results, reliably.

Buck2 multi-language support includes C++, Python, Java, Go, Rust, Erlang, OCaml, and more.

The following sub-sections contain a list of links to key points in the Buck2 Documentation website that explain the advantages of using Buck2 for you and your team.

For end users

For people writing rules

  • Writing Rules - how to write rules to support new languages.
  • Build APIs - documentation for the APIs available when writing rules.
  • Starlark Types - rules are written in Starlark (which is approximately Python), but our version adds types.

For people integrating with Buck2

  • Extending Buck via BXL - powerful Starlark scripts for introspection of Buck2's graphs.
  • Buck2 change detector - tools for building a CI that only builds/tests what has changed in diff/PR.
  • Buck2 GitHub actions installer - script to make GitHub CI with Buck2 easier.
  • Reindeer - a set of tools for importing Rust crates from crates.io, git repos etc and generating a BUCK file for using them.
  • ocaml-scripts - scripts to generate a BUCK file enabling the use of OCaml packages from an OPAM switch.
  • Buckle - a launcher for Buck2 on a per-project basis. Enables a project or team to do seamless upgrades of their build system tooling.

External articles about Buck2

External videos about Buck2

External projects using Buck2

Feel free to send a PR adding your project.