Skip to content
La3 Docs
Browse docs

Getting Started

Install, build, run, and verify the interpreter before touching the compiler.

Requirements

The repo expects a recent Rust toolchain and a working LLVM 18 setup for native work.

  • Stable Rust from rustup.
  • Bun for the website workspace commands.
  • LLVM 18 when working on the native compiler path.
  • Enough local disk space to build the interpreter, runtime, and website together.

Build the interpreter

Compile the Rust interpreter and make sure the baseline still holds.

The interpreter is the first confidence check. It exercises the front end, the checker, and the runtime model without involving the LLVM back-end.

cargo build --release

Run examples

Use the examples directory as a living regression suite and as a source of concrete syntax.

The examples are not throwaway snippets. They cover recursion, structs, enums, Option and Result, collections, channels, and small end-to-end programs that are useful as documentation anchors.

  • fib.la3 exercises recursion and expression-oriented control flow.
  • shapes.la3 shows structs, impl blocks, enums, and exhaustive match.
  • options.la3 demonstrates Option, Result, ?, and ??.
  • channels.la3 shows the concurrency surface of the interpreter.
cargo run -- run examples/shapes.la3

Verify before editing

The fastest confidence loop is to check, build, and then inspect the smallest affected example.

For website changes, bun run check is the first pass. For language or compiler work, the equivalent confidence check is usually the Rust test suite plus the specific example or phase harness affected by the edit.

bun run check
bun run build