Buck2 Build System
buck2.build
1
Leaving SiteNav
External Link Disclaimer
You are about to visit buck2.build. This website is not operated by us. We are not responsible for its content or privacy practices.
About this website
Buck2 is an open-source build system developed by Meta (formerly Facebook) as a successor to Buck (Buck1), designed for large-scale monorepo builds with dramatically improved performance through incremental and remote execution. Released as open source in April 2023, Buck2 is written in Rust and powers builds across Meta's massive monorepo containing tens of millions of source files. Key features: Starlark-based build rules: build rules are written in Starlark (a Python dialect restricted for hermetic builds), making the rule language fully extensible by users without modifying the build system core, unlike Buck1 which had hardcoded rules in Java. Incremental build engine: uses a novel dynamic dependency graph (DGraph) that tracks dependencies at the action level rather than the rule level, enabling precise incremental rebuilds that re-execute only the actions affected by a change, based on content hashing (not timestamps). Remote execution: integrates with remote execution protocols (REAPI), distributing build actions across a cluster of worker machines for massive parallelism, enabling builds that would take hours locally to complete in minutes on a cluster. Remote caching: content-addressed cache for sharing build results across developers and CI. Virtual file system: separates build rule evaluation (Starlark interpreter) from action execution (workers), enabling concurrent evaluation. Materialized artifacts: only materializes build outputs that are explicitly requested. BXL (Buck2 eXtension Language): scripting API for querying and manipulating the build graph. DICE (Distributed Immutable Cache Engine): incremental computation framework. Modeled after Bazel but with significant performance improvements: reported 2x faster end-to-end builds and 4x faster individual rule evaluations compared to Buck1. Used at Meta for Android, iOS, C++, Python, and Rust builds. Apache-2.0.
Tags & Categories
Categories
Tags
Statistics
1
Views
0
Clicks
0
Like
0
Dislike