Overview
What Foundry is, the role of each of its four tools, and why it replaced JavaScript-based toolchains for many Solidity teams.
Third-party documentation. This is independently authored analysis of the public Foundry codebase — not the official docs, and not reviewed or endorsed by the Foundry team.
Foundry
Foundry is an Ethereum development toolkit written in Rust, organized as four command-line tools that share one core: Forge compiles contracts and runs tests against an embedded EVM, Cast turns JSON-RPC into a shell-native experience, Anvil is a local development node capable of forking live networks, and Forge Script executes deterministic multi-transaction deployment flows. Its defining property is speed — compilation caching and parallel test execution routinely make large suites an order of magnitude faster than the JavaScript toolchains it displaced.
Why it exists
The first generation of Ethereum dev tools (Truffle, then Hardhat) ran tests inside a JavaScript runtime, driving the chain through RPC from a Node.js process. Foundry's bet is different: run the tests inside the EVM itself, in Solidity, with a native binary orchestrating. That removes the JS/EVM boundary entirely — no async plumbing around every assertion — and makes properties like fuzzing and invariant checking natural features of the test runner rather than bolt-on libraries.
Where it sits in the ecosystem
- Solidity compilers — Forge manages solc versions per-project and compiles through its own pipeline; it is not tied to a single compiler vendor.
- Anvil — replaces Ganache/Ganache-fork workflows; supports forking mainnet at any block and impersonating accounts.
- forge-std — the standard library of test helpers (assertions, cheatcode wrappers) consumed as a git-submodule dependency.
- CI environments — everything is a static binary; no Node runtime is required to build or test a repo.
