Quickstart: first verified program
From checkout to verified output
1. Verify prerequisites
rustup show
cargo --version
bash scripts/check_prerequisite_manifest.shThe pinned Rust toolchain is in rust-toolchain.toml. The prerequisite manifest is the machine authority for required and optional host tools.
2. Build the CLI
cargo build -p gc_cli --locked
./target/debug/genesis --helpFor release behavior use the repository’s selfhost-strict profile:
cargo build -p gc_cli --profile selfhost-strict --locked3. Write a pure module
Create hello.gc:
(def greet
(fn (name)
(prim str/concat "hello, " name)))
(greet "agent")Format and evaluate it:
./target/debug/genesis fmt hello.gc
./target/debug/genesis eval hello.gc --engine selfhostExpected value: "hello, agent".
4. Observe canonical identity
Formatting is semantic normalization, not cosmetic preference. Canonical CoreForm has one stable printed representation and content hash.
./target/debug/genesis fmt hello.gc --check
./target/debug/genesis eval hello.gc --engine selfhost --jsonPrefer --json in automation. The CLI writes exactly one structured object to stdout and diagnostics to the defined channel.
5. Run a packaged example
./target/debug/genesis test examples/hello_pkg/package.toml --engine selfhostA package binds module hashes, dependencies, capability policy, limits, and obligations. A passing process exit alone is not equivalent to an accepted package; inspect the returned obligation evidence.
6. Continue
- Read the language tour.
- Add host interaction with effects and replay.
- Use the repository’s executable Getting Started for WASI, browser WASM, snapshots, and graphics.