Quick Start
This path takes you from a blank .cam file to generated EVM Solidity and a
Lean project, using the same Counter example that ships in cambrian-lang.
What you will build
A Counter entity with three routes:
- increment — add to the stored count
- reset — set the count to zero
- getCount — return the current count
You will see entities, routes, and member transforms, then transpile the same source to more than one backend.
Steps
- Your First Entity — walk through the real
contracts/counter.camsource. - Compile and Test — transpile to EVM (Foundry),
Lean (
lake build/--check-lean).
Prerequisites
Complete Installation first. You need at least:
cambrian-transpileron yourPATH(or invoke./target/release/cambrian-transpilerfromcambrian-lang)- Foundry (
forge) if you run the EVM test harness - Lean 4 +
lakeif you build the Lean output