Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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

  1. Your First Entity — walk through the real contracts/counter.cam source.
  2. Compile and Test — transpile to EVM (Foundry), Lean (lake build / --check-lean).

Prerequisites

Complete Installation first. You need at least:

  • cambrian-transpiler on your PATH (or invoke ./target/release/cambrian-transpiler from cambrian-lang)
  • Foundry (forge) if you run the EVM test harness
  • Lean 4 + lake if you build the Lean output