Installation
Foundry is installed using foundryup, the official installer and version manager.
This installs the latest stable versions of forge, cast, anvil, and chisel.
Updating
Run foundryup anytime to update to the latest stable release:
$ foundryupInstalling specific versions
$ foundryup --install nightly$ foundryup --install 1.0.0$ foundryup --install abc1234$ foundryup --branch masterInstalling forks
To install binaries from Tempo's fork:
$ foundryup -n tempoBinary verification
Foundry binaries are attested using GitHub artifact attestations. When installing via foundryup, binary hashes are automatically verified against the GitHub attestation.
To manually verify an installed binary:
$ gh attestation verify --owner foundry-rs $(which forge)Use foundryup --force to skip verification and force a fresh install.
Alternative installation methods
Precompiled binaries
Download binaries directly from the GitHub releases page. Extract and add them to your PATH.
Building from source
Requires Rust (latest stable). On Windows, also requires Visual Studio with the "Desktop Development With C++" workload.
$ rustup update stable$ cargo install --git https://github.com/foundry-rs/foundry --profile release --locked forge cast chisel anvilOr build from a local clone:
$ git clone https://github.com/foundry-rs/foundry.git
$ cd foundry
$ cargo install --path ./crates/forge --profile release --locked
$ cargo install --path ./crates/cast --profile release --locked
$ cargo install --path ./crates/anvil --profile release --locked
$ cargo install --path ./crates/chisel --profile release --lockedYou can also use foundryup to build from source:
$ foundryup --branch master
$ foundryup --path /path/to/foundryDocker
$ docker pull ghcr.io/foundry-rs/foundry:latestOr build locally from the repository:
$ docker build -t foundry .CI/CD
See the CI integration guide for GitHub Actions and other CI platforms.
Uninstalling
Foundry stores all files in ~/.foundry. To uninstall:
Was this helpful?
