cambrian-transpiler [OPTIONS] <INPUT.cam>
cambrian-transpiler --project <project.yaml> [OPTIONS]
--target | Output |
evm (default) | Flat Solidity + Foundry harness |
lean | Lean 4 Lake project |
| Flag | Description |
-o <dir> | Output directory |
--project <file> | Load a multi-file project.yaml (target, sources, optional library_paths / imports) |
--target <name> | Select backend |
--dump-ast | Parse, print AST, exit |
--source-map | Emit source maps |
--check-lean | After Lean codegen, run lake build |
cambrian-transpiler contracts/counter.cam -o /tmp/c-evm --target evm
cambrian-transpiler contracts/counter.cam -o /tmp/c-lean --target lean --check-lean
cambrian-transpiler --project examples/governor/project.yaml
cambrian-transpiler contracts/counter.cam --dump-ast
Build the binary with cargo build --release in the cambrian-lang workspace; the executable is target/release/cambrian-transpiler.