Guri — the Teko mascot, a baby guará (scarlet ibis)
Systems language · self-hosting · AOT

A language that compiles itself - byte for byte.

Teko is a small, all-native systems language. Errors are values, memory is arena-based with no garbage collector, and the compiler is written in Teko — rebuilding itself to a byte-identical fixpoint.

self-host proof: gen2==gen3 · byte-identical rebuild
01

What makes it Teko

T | error

Errors as values

No exceptions, no hidden control flow. A function that can fail returns a union and you handle it with match.

no GC

Arena memory

Region-based automatic memory. Allocations belong to a lexical scope and are freed when it ends — deterministic, no collector, no pauses.

gen2 == gen3

Self-hosting fixpoint

The compiler is written in Teko and rebuilds itself to a byte-identical binary. The build is its own proof of correctness.

no cc · no ld

Own AOT toolchain

Its own instruction selection, register allocation, object emission and static linker — targeting x86-64, arm64, riscv64 and wasm.

teko test

Testing built in

Unit tests live beside the code in .tkt files. Coverage floors are declared in the manifest and gate every build.

extern fn

C FFI

Link libc and system libraries and call C directly through extern — no wrapper layer, no runtime glue.

Get started

From zero to a running binary

Teko compiles projects, not lone files — a project is a .tkp manifest plus a src/ directory. Four steps take you from install to output.

1

Install the compiler

Grab the teko binary for your platform and put it on your PATH.

$ teko --version # → teko 0.3.0.21-beta
2

Scaffold a project

teko init lays down the manifest and a source directory with a starter module.

$ teko init hello && cd hello
3

Write Teko

Code lives in src/*.tks. The entry point is a linear virtual main — top-level statements, run in order.

src/main.tks · teko::io::println("olá, Guri")
4

Build, run, test

One toolchain does everything — no external compiler or linker required.

$ teko run . # build (debug) + execute $ teko build . # native binary → bin/ $ teko test . # run .tkt tests + coverage

New to the language? The source is the best reference — the whole compiler is written in Teko. Browse it on GitHub ↗.

Install

One binary, on your PATH

Teko ships as a single self-contained executable — no runtime to install, no dependencies beyond libc. Pick your platform on the Downloads page, then:

1

Download & unpack

Get the archive for your OS and architecture, then extract the teko binary.

$ tar -xzf teko-0.3.0.21-beta-linux-x86_64.tar.gz
2

Put it on your PATH

Move it somewhere on your PATH (or add its folder).

$ install -m 0755 teko /usr/local/bin/teko
3

Verify

Confirm the toolchain is live.

$ teko --version # teko 0.3.0.21-beta

Platforms: Linux (x86-64, arm64), macOS (Apple silicon), Windows (x86-64). riscv64 and WASI are landing with the native-backend wave. On macOS, the download strips the quarantine attribute so the binary runs unsigned.

Downloads

Releases 0.3.0.21 · beta

Teko is in active beta — every merge to the trunk cuts a versioned seed. Grab the latest prebuilt binary below, or build from source.

PlatformArchitectureVersion
Linuxx86_64 · glibc0.3.0.21-betaDownload ↓
Linuxarm64 · glibc0.3.0.21-betaDownload ↓
macOSarm64 · Apple silicon0.3.0.21-betaDownload ↓
Windowsx86_640.3.0.21-betaDownload ↓

Prefer to build it yourself? Clone the repo and run the bootstrap — the compiler rebuilds itself from source. Direct mirror downloads at s3.teko-lang.cloud are being set up; for now releases live on GitHub ↗.