Prerequisites
Install only what you need for the targets you plan to use. The transpiler itself requires Rust. EVM and Lean tooling are optional until you exercise those backends.
Rust (required)
Cambrian is a Rust workspace. Install the toolchain with rustup:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Confirm rustc and cargo are on your PATH:
rustc --version
cargo --version
Keep the toolchain current with rustup update.
Access to the transpiler (cambrian-lang)
The Cambrian transpiler and reference contracts live in the cambrian-lang
workspace. That tree is not open source and is not available as a public
download — there is no public clone URL or release archive.
Cambrian is developed in a proprietary mode. If you are interested in collaborating with the development team or obtaining access to the toolchain, contact [TBD].
Once you have the workspace on your machine, build from its root (see
Building from Source). Sample contracts such as
contracts/counter.cam are in that tree.
Foundry (for --target evm)
The EVM backend emits Solidity (^0.8.24) and, when the program includes
test / fuzz / invariant blocks, a Foundry project (foundry.toml,
setup.sh, and tests under test/).
Install Foundry so forge is available:
curl -L https://foundry.paradigm.xyz | bash
foundryup
forge --version
Lean 4 and Lake (for --target lean)
The Lean backend emits a Lake project (lakefile.toml, pinned
lean-toolchain, and generated modules under Cambrian/). Install Lean 4
via elan:
curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh
elan --version
lake --version
The generated lean-toolchain file pins the Lean version for that output;
Lake will fetch it on first lake build.
What you do not need
Node.js is not required for building the transpiler or for the evm or
lean workflows described in this book.
Checklist
| Component | Needed for | Check |
|---|---|---|
| Rust / Cargo | Building the transpiler | rustc --version |
Foundry (forge) | Running EVM tests | forge --version |
| elan / Lake | Building Lean output | lake --version |
Next: Building from Source.