Ada, but small. Zig, but sweeter. One systems language from 32 KB to 32 TB*. Move fast, keep the pointers, and let the compiler tell you when you are being an idiot.
Status: version 0.2.11. Landin programs build and run on Linux, macOS and FreeBSD, and firmware builds for Cortex-M, RV32 and windowed Xtensa.
The language is pre-v1 and still growing. Its compiler, refine, runs programs on Linux (x86-64, arm64 and RV64), FreeBSD (x86-64 and arm64), macOS (arm64) and Windows (x86-64), and builds firmware for Cortex-M, 32-bit RISC-V and windowed Xtensa. Current compiler capabilities lists what works today.
What Landin is
Landin is a systems programming language with its compiler and a small standard library, all designed and built from scratch. It is named after Peter Landin, who coined the term syntactic sugar and wrote The Next 700 Programming Languages in 1966 — this one is the 701st.
Landin has one target range and the same way of writing code across all of it. A Cortex-M0 with 32 KB of flash is at one end, and a hosted desktop application is at the other. This is what it is like to write:
- Manual memory. Arenas are the idiom, and you pass allocators in as arguments. There is no garbage collector, no reference counting and no destructors.
- Failures in the signature. A function declares what can go wrong as a set of atoms. A caller handles them with
elseor passes them on withtry. - Useful local checks, not a borrow checker. Pointers and slices get origin and escape checks within a function. The language does not claim memory safety: it is deliberately unsafe, with useful local checks.
- Generic code through concepts, dispatched statically or at run time through
any. - No macros and no compile-time execution.
- Native code from its own backends, handed to the platform's assembler and linker.
Installing
refine is Landin's compiler, and the command you run for everything else too: checking, running and compiling programs, formatting source, and the language server and debug adapter your editor starts. An install gives you refine, a few further commands you run through it, and Landin's standard library. There are six ways to get it: with the install script, with Homebrew, from a release, in a container, with nix, or from source.
Use 0.2.9 or later: the first program needs refine run and hosted/blocking, both newer than 0.2.8.
With the install script
On Linux x86-64 or arm64, or on a Mac with Apple Silicon:
curl -fsSL https://www.701.dev/install.sh | sh
It downloads the newest release's archive for your platform, the one From a release describes, checks it against the .sha256 published beside it and unpacks it into ~/.landin. On Linux that is the static archive unless you ask for the other one. It edits none of your files and needs no root: it prints the line that puts ~/.landin/bin on your PATH, which you add to your shell's startup file. Run it again to replace that install with the newest release.
Options follow sh -s --. To install a named release into a directory of your choosing:
curl -fsSL https://www.701.dev/install.sh | sh -s -- --version 0.2.11 --dir ~/opt/landin
From the release after 0.2.11 a release has two archives for each Linux architecture, and --variant static or --variant dynamic chooses between them. Without the option you get the static one, which starts on any Linux. The dynamic one uses your system's glibc and needs glibc 2.38 or later:
curl -fsSL https://www.701.dev/install.sh | sh -s -- --variant dynamic
The option is for Linux only. On a Mac the script refuses it, because macOS has one archive. --list names the archives a release has, both Linux ones among them.
--help lists the options. The script is install.sh in this repository, served unchanged; read it before you run it if you like. It refuses a host no archive serves, Intel Macs, FreeBSD, Windows and other CPU architectures among them. It also refuses an archive whose refine does not start on your host, after downloading and checking it. That is what the dynamic archive, and every archive of 0.2.11 and earlier, does on NixOS, on musl distributions and with a glibc older than 2.38. In both cases it says so, installs nothing, and names nix and the source build instead. For --variant dynamic it also says that the dynamic archive needs glibc 2.38 and that the static one starts on any Linux. With the GitHub CLI installed it also prints the commands that check the archive's attestation, as From a release describes. To remove the install, delete ~/.landin.
With Homebrew
Homebrew installs refine on a Mac with Apple Silicon, and on Linux x86-64 and arm64. An Intel Mac is not covered.
brew install 701-dev/tap/landin
brew upgrade landin updates it and brew uninstall landin removes it. To move an install from the earlier tap janhaan/tap, run brew uninstall landin, then the command above. The formula moves to a new release within a day of its publication.
This installs the release archive for your platform, the one From a release describes; on Linux, from the release after 0.2.11, that is the static one. Its bin/refine, libexec/landin and lib/landin stay together in Homebrew's own directory for the package, and Homebrew puts refine on your PATH.
Linking, and so refine run, needs Xcode's command-line tools on macOS and the system's GCC driver on Linux. See the linker on Linux and macOS.
The library: line of refine version then names the library inside that directory, for example /opt/homebrew/Cellar/landin/VERSION/lib/landin on a Mac.
From a release
The archive for your platform on the releases page holds bin/refine, the commands it runs from libexec/landin and the library under lib/landin, with no top-level directory. Unpack it into a directory of its own and put its bin on your PATH.
From the release after 0.2.11, a release publishes two archives for each Linux architecture, x86-64 and arm64. macOS has one archive, as before, and FreeBSD x86-64 one, landin-VERSION-x86_64-freebsd.tar.gz, whose refine needs only the base system and links with its cc and binutils' as (pkg install binutils).
The static archive has the platform's name: landin-VERSION-x86_64-linux.tar.gz and landin-VERSION-aarch64-linux.tar.gz. Its refine and the commands it runs have glibc linked in. It asks for no loader and no shared library, so it runs on any Linux: musl distributions such as Alpine, NixOS, and distributions whose glibc is older.
The dynamic archive is beside it: landin-VERSION-x86_64-linux-dynamic.tar.gz and landin-VERSION-aarch64-linux-dynamic.tar.gz. Its refine uses the system's glibc, so it takes the system's glibc fixes. It needs glibc 2.38 or later and its standard loader, /lib64/ld-linux-x86-64.so.2 on x86-64 and /lib/ld-linux-aarch64.so.1 on arm64. It does not start on Debian 12 (glibc 2.36), Ubuntu 22.04 (2.35) or RHEL 9 (2.34), nor on NixOS or a musl distribution.
0.2.11 and earlier have one Linux archive for each architecture, and those stay published. It has the platform's name but is a dynamic one, linked against the glibc of Ubuntu 24.04, with the same needs as the dynamic archive above. Where it does not start, install with nix or build from source.
The static archive holds two more files at its top level, which the dynamic one does not have. LICENSE-GLIBC is the copyright file of the Debian or Ubuntu libc6-dev package whose libc.a was linked in, with glibc's licence, the LGPL, version 2.1 or later. NOTICE-GLIBC names that glibc by its package version and distribution, says where its source is, and says how to relink refine with a modified glibc from Landin's public source.
Beside each archive is landin-VERSION-PLATFORM.tar.gz.sha256, one line in sha256sum's own format: SUM landin-VERSION-PLATFORM.tar.gz. For a dynamic archive, PLATFORM here and below ends in -dynamic, as in x86_64-linux-dynamic. Download it into the same directory as the archive and check the archive against it:
sha256sum -c landin-VERSION-PLATFORM.tar.gz.sha256 # Linux shasum -a 256 -c landin-VERSION-PLATFORM.tar.gz.sha256 # macOS
It prints OK after the file name when the archive arrived whole and unchanged. It does not say who built it.
The attestation does: the release workflow built each archive from its tag. With the GitHub CLI, check a downloaded archive before you unpack it:
gh attestation verify landin-VERSION-PLATFORM.tar.gz --repo 701-dev/Landin \ --signer-workflow 701-dev/Landin/.github/workflows/release.yml \ --source-ref refs/tags/vVERSION --deny-self-hosted-runners
Releases up to 0.2.10 were built before the repository moved from the account JanHaan to the organisation 701-dev, and their attestations name the old owner: for those, write JanHaan for 701-dev in both options.
Each archive leaves the compiler's debug information out and publishes it beside it as landin-VERSION-PLATFORM-debug.tar.gz, which for a dynamic archive ends in -dynamic-debug.tar.gz. You need that file only to read a crash of the compiler itself.
In a container
Each release publishes an image on GitHub's container registry, ghcr.io/701-dev/landin:VERSION. The tag is the release's version without the v: release vVERSION is tag VERSION. There is no latest tag, so name the version. Each tag holds Linux amd64 and arm64, and Docker or Podman picks the one for your host. Images start with the first release after 0.2.11; 0.2.11 and earlier have none.
The image is Debian 13 with the static release archive for its platform unpacked in /usr/local: refine in /usr/local/bin, its commands in /usr/local/libexec/landin and the library in /usr/local/lib/landin. It also holds Debian's gcc and libc6-dev, which refine links with.
Its working directory is /work. Mount your directory there and run as your own user, so the files refine writes are yours:
docker run --rm -v "$PWD:/work" --user "$(id -u):$(id -g)" \ ghcr.io/701-dev/landin:VERSION refine run main.ldn
Compile and run a program the same way: give refine compile main.ldn -o main as the command, and then ./main. podman takes the same arguments.
With no command the image runs refine version, whose library: line then says /usr/local/lib/landin.
The release workflow attests each image. With the GitHub CLI, check one:
gh attestation verify oci://ghcr.io/701-dev/landin:VERSION --repo 701-dev/Landin \ --signer-workflow 701-dev/Landin/.github/workflows/release.yml \ --source-ref refs/tags/vVERSION --deny-self-hosted-runners
The image links only for Linux on its own architecture. It holds no toolchain for firmware (Cortex-M, RISC-V, Xtensa) or for the other Linux architecture. Add one from Debian in an image of your own, for example for Cortex-M:
FROM ghcr.io/701-dev/landin:VERSION RUN apt-get update \ && apt-get install --no-install-recommends --yes gcc-arm-none-eabi libnewlib-arm-none-eabi \ && rm -rf /var/lib/apt/lists/*
refine also finds these Debian packages:
gcc-riscv64-unknown-elf, for RV32 firmware;gcc-aarch64-linux-gnuandlibc6-dev-arm64-cross, to link Linux arm64 programs on amd64;gcc-x86-64-linux-gnuandlibc6-dev-amd64-cross, to link Linux amd64 programs on arm64.
Espressif's Xtensa compiler is not in Debian; it comes from Espressif. When a driver is missing, refine's error names the package to install.
To debug inside a container, install gdb the same way. It needs no extra capability. It warns that it cannot turn off address randomisation, which Docker's default security profile refuses, so a program's addresses can differ from one run to the next.
An image moves only at a release: the Debian packages inside are the ones of the day the release was built.
A second image, ghcr.io/701-dev/landin-contributor:VERSION, is for building the compiler itself. See Building and checking.
With nix
This command installs the prebuilt compiler and puts refine on your PATH:
nix --extra-experimental-features 'nix-command flakes' \
profile install github:701-dev/LandinIt works on Linux x86-64, Linux arm64 and macOS arm64. It fetches the latest release archive, about 17 MB, and compiles nothing, so it takes seconds. On Linux, from the release after 0.2.11, that is the static archive.
You can leave the --extra-experimental-features option out once experimental-features = nix-command flakes is in ~/.config/nix/nix.conf.
To run refine without installing it, use nix run. Everything after -- goes to refine:
nix run github:701-dev/Landin -- version nix run github:701-dev/Landin -- run main.ldn
The second line runs the first program.
To build from source instead, for example to get unreleased changes from main, install #refine. The first source build also fetches the pinned toolchain, which takes a few minutes:
nix profile install github:701-dev/Landin#refine
In a clone, nix build .#refine builds the checkout into result/, and nix build alone fetches the release.
From source
On Linux x86-64, Linux arm64 or a Mac, you can fetch the pinned GNAT and GPRbuild and build from a clone. Any other host needs nix.
environments/pins.sh holds the versions, URLs and SHA-256 sums of GNAT and GPRbuild. Its landin_install_toolchain downloads both archives and checks each against its sum. The archives are about 500 MB together.
You need these tools first:
curl,sha256sumandtarforlandin_install_toolchain;python3andgitfor the build;- on a Mac, Xcode's command-line tools as well.
git clone https://github.com/701-dev/Landin cd Landin . environments/pins.sh landin_install_toolchain "$HOME/landin-toolchain" x86_64-linux export LANDIN_GNAT_HOME="$HOME/landin-toolchain/gnat-$LANDIN_GNAT_VERSION" export LANDIN_GPRBUILD_HOME="$HOME/landin-toolchain/gprbuild-$LANDIN_GPRBUILD_VERSION" ./scripts/build.sh --compiler-only
These commands name x86_64-linux. Name aarch64-linux on Linux arm64 instead, and aarch64-darwin on a Mac.
The build prints where it put refine. On Linux x86-64 that is compiler/ada/build/linux-amd64/debug/bin/refine, where linux-amd64 is the build tag that keeps each host's objects apart.
That is the debug build, which keeps the compiler's own internal checks on. LANDIN_BUILD_MODE=release builds the faster release one beside it. On Linux the release build links statically and needs glibc's static library, libc.a: libc6-dev has it on Debian and Ubuntu, and on Fedora you install glibc-static. The debug build does not need it.
A static refine linked against musl and the jemalloc allocator has been built once, as a test, and the project does not build or publish one. It was built on Alpine 3.24, for x86-64 only, with Alpine's GNAT 15.2 and a GPRbuild 26.0.0 built from its sources. The pinned GNAT 16.1 has no musl build. Run with jemalloc's thread cache off (MALLOC_CONF=tcache:false), it passed the whole test program, 1279 of 1279 cases. On the scaling corpus it compiled about 6 % slower than the static glibc build. arm64 was not built.
Making one needs source changes that are not in this repository, so you would have to make them yourself: two musl portability fixes in the C adapters, about twenty workarounds for GNAT 15.2, the jemalloc link and its heap figure, and accepting a musl host triple as Linux. Without the last, a refine built for musl refuses every compile that does not pass --target=linux-x86-64. The static glibc archive is the supported way to run refine on a musl distribution.
This refine reads the clone's library, so put its directory on your PATH rather than copying it elsewhere.
The linker on Linux and macOS
Linking on Linux uses GCC as the linker driver, even when the program links no C library. refine run links, so it needs GCC too. The GCC is the one your distribution installs. refine looks for it under these names, in this order, and runs the first one it can start, so any one of them is enough:
x86_64-pc-linux-gnu-gcc, the name a GCC built from its own sources takes;x86_64-linux-gnu-gcc, on Debian and Ubuntu;x86_64-redhat-linux-gcc, on Fedora;gcc, whichnix-shell -p gccprovides on NixOS andapk add gccon Alpine.
On an arm64 machine the names are aarch64-linux-gnu-gcc, aarch64-redhat-linux-gcc, aarch64-unknown-linux-gnu-gcc and gcc, in that order. --toolchain=NAME names a driver yourself, and then refine tries that one alone.
On Alpine, a program that links the C library, with --link=libc, also needs the musl-dev package.
Without one, refine names each driver it looked for, in the same order, and says what to install. Checking, formatting, the language server and emitting assembly or the intermediate representation (IR) need none.
macOS links through the Xcode command-line tools.
Checking the install
Run refine version. It names the compiler: a release, or refine dev (01234567) for a build from a clone. Its library: line names the directory the standard library is read from: the archive's lib/landin, the one in Homebrew's directory for the package, or the clone. The lines under it name the citations.txt that refine explain reads, say whether it can be read, and list each command shipped beside refine with its path.
Your first program
With refine installed, make a directory for the program and go into it:
mkdir hello cd hello
Save this there as main.ldn:
import core/io import hosted/blocking public main: () -> (code: i32) = host := blocking.new() io.write(host, io.out(host), "Hello, world!\n") else none code = 0 end main
Run it:
refine run main.ldn
Hello, world!
refine run compiles the program into a private temporary directory, runs it, exits with its status and removes the directory. To keep the executable, compile it instead; the executable prints the same line:
refine compile main.ldn -o hello ./hello
blocking.new() is the program's handle on the operating system, and io.write writes through it. Writing can fail; else none says that here it does not matter. The tour starts from this program and explains each line.
When a check stops your program
A failed check stops the program and prints its place. An index past the end of an array, for example, prints main.ldn:4:12: trap: out_of_range. The shell then reports an illegal instruction, or on some systems a trace trap, with a status above 128. That is the check stopping the program, not the compiler crashing.
What to read next
| read | for |
|---|---|
| The tour | the language, from this program up, one numbered entry at a time |
examples.md | complete programs to copy, compile and run |
| Landin for C programmers | the Landin form of each C habit you bring |
| The library reference | every public module of core, hosted and platform, with examples |
| Editor support | highlighting and the language server for Zed, VS Code, Neovim, Emacs, JetBrains IDEs and more |
All of them are also published as reading copies at <https://www.701.dev>, where every [NNNN] citation links to the construct it names.
refine in brief
| command | what it does |
|---|---|
refine check main.ldn | check a whole program, writing nothing |
refine run main.ldn -- ARGS | compile, run and remove a program, exiting with its status |
refine compile main.ldn -o prog | compile and link an executable |
refine compile --debug=full ... | include source debugging for GDB or LLDB |
refine compile --target=linux-arm64 ... | compile for another target; refine targets lists them |
refine fmt main.ldn | rewrite a source in the one layout; --check only reports |
refine fix main.ldn | apply every exact fix the compiler's report carries, such as a removed form's rewrite; --code=L0696 applies only that code's fixes; --check only reports |
refine explain L0301 | explain a diagnostic code and what to change. It also explains a numbered paragraph of the tour or spec.md, [1760], or a decision recorded in spec.md, D275, which it reads from the citations.txt installed with the library |
refine site prog SITE | name the source line and the failed check of the panic site a program's handler received, from the table --panic-map writes beside it |
refine site prog FILE LINE COLUMN | name the source position of a caller's three coordinates, from the same table |
refine lsp | the language server an editor starts |
refine dap | the debug adapter an editor starts: a Debug Adapter Protocol server that debugs through GDB or LLDB and shows a panic at its source line |
refine svd --policy=P.json --out-dir=DIR CHIP.svd | generate a chip's register modules and interrupts from its SVD (System View Description); see devices |
refine bindings --clang=clang-19 ... api.h | generate Landin bindings and C adapters for C headers; see bindings |
refine version | name the compiler, the library it uses and the commands shipped beside it |
refine targets | list the described targets, their CPU feature levels and debug modes; --json gives structured output |
refine completion bash | print shell completion definitions; also zsh and fish |
refine --help, refine compile --help | every command, and one command's options |
refine help compile, refine help reference | the same command help, and the reference of every built-in command |
refine NAME ... | run refine-NAME, a command shipped beside refine or found on PATH; refine help lists them |
refine help reference prints the complete interface of the built-in commands, and the command line describes it. svd, bindings and site are split commands, executables of their own that refine runs from libexec/landin, and print their own help: refine help svd or refine svd --help.
Current compiler capabilities
This section is a summary. What refine does today is the full inventory.
Targets
The tables say what refine builds for each target and how the gate runs it. Every push runs the gate; see Building and checking.
Hosted targets:
| target | builds | runs in the gate |
|---|---|---|
| Linux x86-64, Linux arm64 | hosted executables | natively, with GDB |
| Linux RV64 | hosted executables | under QEMU's user emulation, with GDB |
| macOS arm64 | hosted executables | natively, with LLDB |
| FreeBSD x86-64 and arm64 | hosted executables, emitted on Linux, or on FreeBSD by refine built there | in FreeBSD VMs, with LLDB |
| Windows x86-64 and arm64 | hosted executables, emitted on Linux | natively on Windows runners, with LLDB |
Firmware targets:
| target | builds | on boards | runs in the gate |
|---|---|---|---|
| Cortex-M | boot or RAM firmware for the device description it imports, or for the reference firmware profile of 32 KiB flash and 16 KiB RAM | RP2040, RP2350 and STM32H753, whose Cortex-M7 uses its float unit and caches | under the pinned QEMU, with GDB |
| Xtensa | firmware at xtensa-esp32 (LX6, default) or xtensa-esp32s3 (LX7) | ESP32 and ESP32-S3 | under Espressif's QEMU |
| RV32 | firmware at rv32imc or rv32imac for the device description it imports, or within the same reference's capacities | ESP32-C3, ESP32-C5 and RP2350 Hazard3 | under Espressif's QEMU |
What refine does today says what each board run records and what the gate checks for each target.
Language, library and tooling
- The enabled language: functions, aggregates and variants, declared failures with
elseandtry,deferandundo, generics and concepts with static oranydispatch, local origin and escape checks, directory modules, atomics, volatile access and packed register images, and stackful fibres on every native target. - The library:
coremodules of allocators, containers, text, I/O, time, networking, random numbers and atomic cells, each provider with a fake for testing, andhostedproviders over POSIX, among them threads started as a group a function joins. A Linux executable links no C library unless--link=libcasks for one. - The C boundary: each hosted target's C ABI, packed and flexible records, callbacks and variadic calls, Cortex-M's AAPCS32 with its float unit's variant, without variadic calls, and
refine bindings, a binding generator over Clang. - Code generation: byte-identical output on every target whatever the build environment; register allocation, inlining and simplification at speed; and only the functions a program reaches are emitted. The Benchmark Game, measured compares five ports with seven other languages.
- Tooling: source debugging on every target, a formatter, a language server, a debug adapter that an editor runs over GDB or LLDB, explained diagnostics with fixes, stack-depth reports, and
refine site, which turns a panic site into its source line.
The roadmap
ROADMAP.md is the sole authority for open work. In short:
- The first roadmap built the enabled language, hosted Linux, native macOS and Cortex-M firmware. It closed with the pre-v1 language feature-complete, a claim about coverage and nothing else.
- The second roadmap took the compiler to an editor, more hosted targets, the microcontrollers people buy, a library split into freestanding and hosted halves, concurrency and the start of measured optimization. Its Windows phase was never started.
- The current roadmap makes the language smaller and the tools around it ordinary: the project's own process first, then
refinesplit into commands, a breaking simplification of the language, a review of the standard library, Windows, and the library a newcomer expects to find. Measured optimization runs beside all of it. A build tool and package manager, self-hosting, a browser target, dates and times in the library and every release decision stay outside it.
Next roadmap item: R21.70 — What Windows still lacks (planned).
Questions, bugs and ideas
Ask questions, report bugs and friction, and propose ideas or changes to the language in Discussions. Each category's form says what a report needs.
- A typo, a mistake in the documentation, a refusal that did not help or an idea each get a thread of their own.
- Put suggestions for the next roadmap in its standing thread.
- Report a security vulnerability privately, through GitHub's private reporting, and never in a discussion.
The repository has no issue tracker: a discussion that leads to work becomes an item in ROADMAP.md or a register record under roadmap/register/. Everyone taking part follows the code of conduct.
Working on Landin
AGENTS.md is the guide to working in this repository, for people and agents alike. It holds the order of authority among the documents, every command, the continuous-integration (CI) gate and the rules the compiler keeps.
The validation workflow explains the edit, test and push loop.
Feedback goes to GitHub Discussions, as Questions, bugs and ideas describes. If you propose a change there, say which checks cover it: python3 check.py for documentation, or the focused tests the workflow describes for code.
What is in the repository
| path | what it is |
|---|---|
tour.md | the language explained, as a numbered "learn X in Y minutes". Teaches; does not decide. |
spec.md | the normative specification: the grammar of the enabled language, the rules the tour left unsaid, and the register of decisions. |
handoff.md | the design in one page, and which decisions must not be quietly reversed. |
ROADMAP.md | the sole authority for open work: phases, dependencies, gates and the retained positions. The register of work waiting for a trigger is one file a row under roadmap/register/, with a generated overview in roadmap/register.md; decisions only the maintainer can take are under roadmap/questions/, and the inputs the decision items cite under roadmap/inputs/. |
examples.md | complete programs, each printing what it computes; the gate runs every one. |
prototype-*.md | the five design stress tests; see The prototypes. |
compiler/ada/ | the Ada 2022 bootstrap compiler: refine, its frontend, verified IR, native backends and test harness. |
compiler/tests/ | the fixtures, in a format that outlives the implementation checking them. |
core/, hosted/, platform/ | the standard library. |
docs/ | derived guides, never authorities: the documents' arrangement, diagnostics, formatting, the language server, writing a command for refine, the IR, target contracts, environments, and non-normative design notes. |
examples/ | the programs derived from prototypes 2, 3, 4 and 5: config_parser/, derived_containers/, derived_hosted/ and derived_server/. |
bindings/ | refine bindings' policy, its tests and its documentation. The C binding generator asks an external Clang for a header's AST (abstract syntax tree), so the compiler never parses C. |
highlight/ | highlighting and editor packages, from VS Code and JetBrains IDEs through Vim, Emacs and Notepad++. |
environments/ | pins.sh, the one place a toolchain version or checksum is written, and the environments that produce evidence. |
scripts/, check.py, flake.nix | build, test and check commands, and nix develop. |
The prototypes
The five prototype-*.md files are not tutorials and not example programs. Each was written before the compiler could do what it asks, in order to make the specification fail. Each ends with its findings, and keeps the wording that turned out wrong beside its resolution. The prototypes are sketches that leave bodies out with ...; what runs is derived from them.
| prototype | what it presses on | what runs |
|---|---|---|
prototype-1-driver.md | a Cortex-M driver from a vendor SVD: registers, DMA (direct memory access), interrupts, a vector table | the derived driver |
prototype-2-parser.md | a parser that recovers from errors rather than stopping at the first | examples/config_parser/ |
prototype-3-containers.md | generic containers, allocators, escape rules | the core containers and examples/derived_containers/ |
prototype-4-app.md | a hosted application chosen by its command line: runtime dispatch | examples/derived_hosted/ |
prototype-5-server.md | a server with two requests in flight, and a Cortex-M0 counterpart answering them on one core: fibres, started as a group | examples/derived_server/ and the firmware counterpart |
Building and checking
nix develop # or set LANDIN_GNAT_HOME and LANDIN_GPRBUILD_HOME ./scripts/build.sh # the compiler and its test program ./scripts/test.sh # the complete suite, on Linux ./scripts/dev-test.sh --suite='fixture execution' # a FILTERED run while editing python3 check.py # the mechanical checks over documents and fixtures
Without nix, the contributor image of a release, ghcr.io/701-dev/landin-contributor:VERSION, holds the GNAT and GPRbuild that release's environments/pins.sh names, already set up, with python3, git, Clang and GDB, for Linux amd64 and arm64. Use the image of the release whose pins your checkout has, and give its objects a build tag of their own:
docker run --rm -v "$PWD:/work" --user "$(id -u):$(id -g)" -e HOME=/tmp \ -e LANDIN_BUILD_TAG=image ghcr.io/701-dev/landin-contributor:VERSION \ ./scripts/build.sh --compiler-only
check.py is not a parser. It is the set of invariants that are cheap to check and tedious to re-check by hand, and every defect it missed once belongs in it.
Every push runs the gate, which tests every target in separate jobs. The gate is a safety net, not a verdict on a revision.
The site is rendered from these files by ./scripts/site.sh and published only from main; see the site guide. GitHub is canonical, and git.sr.ht is a mirror.
Where the history is
The design was argued out over a long sequence of numbered revisions, the prototypes and two outside reviews. That archive is kept separately, and nothing here depends on it.
What was worth carrying came along. The tour's closing section, WHAT WAS TRIED AND DROPPED, keeps the things that were designed and then taken out again, because a reader who does not know them will propose them back.
The exact-revision acceptance that approved every revision through 0.2.0 is retired.
License
Copyright (c) 2026 Jan Haan. MIT OR Apache-2.0: use this under either the MIT license or the Apache License, Version 2.0, at your option. LICENSE says which file governs what.
What refine produces is not a derivative work of refine. Compiling a program places no licensing condition on that program, and neither does linking core/* into it — which is the point of a language that has to fit in 32 KB of somebody else's flash.
*32 TB is an unverified goal. What it measures at the hosted end, and what evidence would prove it, are still open, and nothing hosted today establishes it. Terabytes may vary.