# Lane for agents

> How to read and write Lane from a program: the index files, the one-page cheat sheet, verified examples and the error reference.

These pages are plain Markdown with no JavaScript needed. Every docs page has a Markdown twin at the same path with `.md` added, and the whole reference is one file.

## Start here

- [Lane in one page](/docs/agents/lane-in-one-page.md): every construct with one minimal example, and the exact rules that are easy to get wrong.
- [Verified examples](/docs/agents/examples.md): programs from the test suite with their expected standard output and exit codes, grouped by feature.
- [Error reference](/docs/agents/errors.md): every distinct compiler message with a program that triggers it.

## Index files

- `/llms.txt`: the title, a summary, and a link to every page in Markdown.
- `/llms-full.txt`: the whole language reference in one plain-text file.
- `/docs/<page>.md`: the Markdown twin of each docs page.

## Status (as of 2026-10-22)

Which constructs the current compiler accepts. The language is larger than this list; see the roadmap for what comes next.

- **Builds:** integers and bool, f32 and f64 (strict IEEE, with a native square root), pointers, slices, arrays, records, enums, match, constants, functions, access modes (wr, out) and their aliasing check, if, for (all three forms), brk, nxt, ret, defer, use, pub, ext with @lib, embed, size_of, align_of, cast, slice, implicit conversions between number types when nothing can be lost, fixed-width vector types and their operations, contracts (assume lines and test examples, run during builds for every target, with exact float results and examples on exported library functions), and the standard library modules io, fmt, mem, os, bufio and float, plus files and processes on Windows. Constants that divide an integer by zero, or that are infinity or NaN, are compile-time errors.
- **Parsed only:** vec and par, soa and aos, when, union, generics ($T), functions as values, variadic parameters, several results, attributes other than @lib, and test and bench blocks. The compiler refuses them with a "not supported ... yet" error.
- **Not accepted:** record and array literals, returning a record or an array, and the number types f16, un8, un16, sn8, sn16, bf16, f8e4m3 and f8e5m2.
- **Targets:** x86-64 Windows executables, x86-64 Linux executables (--target linux, static, no C library), wasm32 and wasm64 modules, AArch64 Linux and macOS (arm64) executables, and RISC-V 64 Linux executables. These describe the development compiler on 2026-10-22; the latest published release may predate some of them, and the Downloads page offers the latest published release. Optimization at -O1 is available on x86-64, AArch64 and RISC-V 64, and floats are optimized on x86-64.
- **Compiler:** The compiler is written in Lane and builds itself to a byte-identical result (the fixpoint), on Windows, Linux and macOS (arm64); a bootstrap compiler only starts the chain.
## What an agent can rely on

- Every Lane example on this site comes from a program that the compiler's test suite builds or parses, and is checked against it when the site is built. An example is never retyped.
- The test suite is the ground truth: a "Verified" label means the suite builds and runs the program and compares its standard output and exit code, or compares the compiler's message when the program must be refused.
- A construct the parser accepts but the compiler cannot build yet is refused with a "not supported ... yet" message. The Status section below lists them.
- Compiler messages are plain lines, `path:line:col: error: message`, on standard error, with exit code 1. No tool output is JSON.
- The language specification is the source of truth; this site is regenerated from it, and the footer says when the docs were last updated.
