# Lane documentation

> A syntax tour of Lane for people, and a set of plain-Markdown pages for agents.

Lane is a data-oriented systems language. This tour follows the language specification and shows only code that really exists: programs from the compiler's test suite, the standard library, and syntax examples that the parser accepts.

```lane
use io;

nul main() {
    io.print("hello, world\n");
}
```

## Verified examples

A program that the compiler's test suite builds is marked "Verified: builds and runs". The page shows the standard output and exit code the suite expects, read from the test when this site is built, so the claim is checked at every build. A program that the compiler must refuse is marked "Verified" with the compiler's message.

Which constructs the current compiler accepts is listed, with a date, in the Status section of the [agent docs](/docs/agents.md). The [roadmap](/roadmap.md) has what comes next.

## The tour

1. [Types and literals](/docs/types.md): scalars, wrapping arithmetic, literals that take their type from context, no implicit conversions.
2. [Declarations and functions](/docs/declarations.md): type-first declarations, access modes (`wr`, `out`), several results, variadic parameters, function types.
3. [Statements and control flow](/docs/statements.md): `if`, the three kinds of `for`, `brk`, `nxt`, `ret`, `defer`, scopes.
4. [Records, enums and match](/docs/records-enums.md): C layout, copying, enums as `u32`, exhaustive `match`.
5. [Constants](/docs/constants.md): exact compile-time arithmetic, typed and untyped constants.
6. [Memory](/docs/memory.md): pointers, slices, arrays, arenas, and why there is no `new`.
7. [Data layout, SIMD and threads](/docs/layout-simd.md): `soa`, `aos`, vector types, `vec`, `par`.
8. [Per-ISA code, hints and floats](/docs/targets-hints.md): `when`, hints, `@fp`.
9. [Contracts](/docs/contracts.md): `assume` and examples.
10. [Modules and the standard library](/docs/modules.md): `use`, `pub`, `ext`, `io`, `fmt`, `mem`, `os`, `bufio`.
11. [The `lane` command and its tests](/docs/tooling.md).

## For agents

The pages under [For agents](/docs/agents.md) are written to be read by a program: plain Markdown, no JavaScript needed, with a one-page cheat sheet of the rules that are easy to get wrong, the verified examples and the error reference. `/llms.txt` indexes them and `/llms-full.txt` is the whole reference in one file. Every page here also has a Markdown twin: add `.md` to its path.
