The Koru Book

Learn Koru through working examples. Every lesson is a real test from the compiler's regression suite.

Tests: 1718
✓ 1531 passing
✗ 119 failing
○ 65 planned
Linear documentation and a formal language spec are coming as Koru stabilizes. For now, the suite is the book — browse by example below.

core language / basic syntax

22/24

core language / events flows

38/40

core language / literals

7/8

core language / type system

10/16

core language / control flow

31/32

module system / imports

21/27

module system / comptime mirror

47/47

module system / namespaces

2/2

module system / packages

10/10

module system / file layout

18/19

parser

11/11

compiler features / parser

166/177

compiler features / compilation

15/19

compiler features / flow checker

9/12

compiler features / codegen

1/1

compiler features / emitter

9/9

compiler features / std library

3/3

compiler features / template engine

9/9

compiler features / subflow

1/1

syntax / struct constructors

2/2

advanced features / comptime

77/93

advanced features / stdlib

50/52

advanced features / keyword

5/5

advanced features / phantom types

109/130

advanced features / obligation stress

22/25

advanced features / obligation matrix

6/6

The permutation matrix of Koru's phantom-obligation discharge system — the

advanced features / type system

11/15

advanced features / auto proc

3/3

advanced features / pattern branches

3/4

advanced features / subflows

22/24

advanced features / optional branches

11/12

advanced features / taps observers

8/10

advanced features / interceptors

0/4

advanced features / phantom types

0/1

advanced features / variants

13/20

advanced features / templating

2/4

advanced features / kernel

36/38

advanced features / testing

13/13

control flow

29/33

runtime features

110/121

runtime features / budgeted interpreter

6/7

runtime features / purity checking

9/10

runtime features / performance

2/20

runtime features / coordination

7/12

runtime features / runtime

25/32

runtime features / resource bridge

17/17

integration testing / negative tests

51/54

integration testing / negative tests / 020 parse errors

1/1

integration testing / negative tests / 034 type errors

1/1

integration testing / bug reproduction

3/3

integration testing / validation

10/10

stdlib / string

18/20

stdlib / fmt

6/7

stdlib / io

6/6

stdlib / regex

16/16

stdlib / parser

14/14

stdlib / switch

4/4

stdlib / fs

6/8

stdlib / collections

22/26

stdlib / net

2/2

stdlib / invariants

2/2

stdlib / assumes

2/2

stdlib / todo

4/4

stdlib / trellis

5/7

stdlib / store

176/183

stdlib / store tree

5/5

stdlib / grid

14/14

nesting sweep

34/35

event globbing

3/10

challenges

3/3

aoc 2015

38/44

the world

25/25

examples showcase

1/1

examples showcase / language shootout

30/30

watchdog selftest

1/1