Skip to main content

Installing Buck2

Installing Buck2

The latest set of buck2 executables can be found under the latest release page.

Additionally, for each bi-monthly release there is a dotslash file that is appropriate for checkin to a repository. This will automatically fetch the correct version and architecture for each user, and ensures a consistent build environment for each commit in the repo.

To get started, first install rustup, then compile the buck2 executable:

rustup install nightly-2025-02-16
cargo +nightly-2025-02-16 install --git https://github.com/facebook/buck2.git buck2

The above commands install buck2 into a suitable directory, such as $HOME/.cargo/bin, which you should then add to your $PATH:

Linux / macOS

export PATH=$HOME/.cargo/bin:$PATH

Windows Powershell

$Env:PATH += ";$HOME\.cargo\bin"

With Buck2 installed, you can build projects with buck2!

You can verify that it's working by running buck2 --help.