Kofun 0.13.5-seed · research compiler

Clear code.
Native ground.

Kofun explores low-sigil ownership and functional composition with a Kofun-written seed, a three-generation fixed point for its frozen profile, and bounded C11, ELF64, and wasm32 checkpoints. Every active compiler claim is tied to executable evidence.

0.13.5-seed3-gen fixed pointKIF v2Int64 wasm32C ABI
Language

Less punctuation.
More intent.

Kofun is designed so a small program stays small, while deeper safety and type machinery remains available when the problem asks for it.

01

Ownership in checked slices

Borrowed List moves and bounded affine resource-handle protocol run as bounded checkpoints. The general ownership and law checking remains open.

fn consume(take values: List[Int])
02

Useful types, executable now

Bounded C11 profiles execute functions, C11 bounded List[Int] values and mutable local writes, records, enum matching, and exact Decimal arithmetic, explicit rounding, and binary64 Float.

fn total(values: List[Int]) -> Int
03

Native from first principles

The direct backend writes static ELF and machine code itself—without routing through C, an assembler, or a linker.

source → Core → ELF64
Playground

Touch the syntax.
See the idea run.

Edit a program and press Run. Every example below is also executed by the repository CLI in the site gate. The browser evaluator mirrors only this bounded learning subset; broader compiler checks stay in the repository. Open the checked wasm32 tour →

play.kofunbrowser subset
main.kofun
Outputfinished
4
13
52 tokens25 steps1.37 ms
Honest boundaryThese examples are checked against the repository CLI. This runner mirrors their safe learning subset in TypeScript; the compiler remains the source of truth for ownership, laws, and native builds.
Toolchain

A straight line
to the metal.

Kofun keeps the compiler path visible. Today's checked profiles are deliberately bounded—and every supported path has an executable gate.

Inspect the native backend
01Source.kofun
02Bounded profilesindependent gates
03Checked outputsC11 · ELF64 · wasm32
Start local

From checkout
to native in seconds.

No package installation is required for the repository launcher. A C11 compiler is required for the checked seed and host-C paths.

terminal
$ git clone https://github.com/kofun-lang/kofun.git
$ cd kofun
$ mkdir -p build
$ ./bin/kofun run bootstrap/fixtures/answer.kofun
42

$ ./bin/kofun build bootstrap/fixtures/answer.kofun \
    -o build/answer
build/answer