FAQ
What is Cambrian?
A language for stateful, message-based programs (entities, routes, and member transforms). One .cam source can target Solidity-EVM and Lean-EVM backends.
How do I run tests?
- EVM:
cambrian-transpiler … --target evmthenbash setup.sh && forge testin the output directory. - Lean:
--target leanthenlake build, or pass--check-lean.
See Testing.
What is Lean-EVM?
--target lean shares the EVM domain with Solidity (calls, value, CREATE2 rules) but emits Lean 4 for machine-checked reasoning instead of Solidity text.
Do I need project.yaml?
Single-file programs can be passed directly on the CLI. Multi-entity apps, Foundry/Lean knobs, shared source lists, and library search roots (library_paths / imports) use project.yaml (reference).
Why did the compiler reject min(a, b)?
Bare stdlib names are invalid (V49). Write std::math::min(a, b). (A
bare min(a, b) is accepted only when your program declares its own
pure fn min, and then it calls that function.)
Is Cambrian open source?
Yes. The transpiler, reference contracts and component library are published in
cambrian-lang under the GNU GPL
v3.0 only, with prebuilt binaries on its
Releases page.
Where is the language specified?
This book is the public guide. The cambrian-lang repo also maintains docs/LANGUAGE.md, docs/STDLIB.md, and the parser grammar — when docs disagree with code, trust the transpiler and fix the docs.
Can I mix hand-written Solidity with Cambrian?
Yes, via extern entity (and optional @solidity_import) and Foundry remappings for dependencies. See Extern Entity and the governor / OZ integration examples in the lang repo.