The Koru Book

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

Tests: 2296
✓ 2126 passing
✗ 0 failing
○ 156 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

24/25

core language / events flows

39/41

core language / literals

7/8

core language / type system

3/4

core language / control flow

37/38

module system / imports

26/32

module system / comptime mirror

54/54

module system / namespaces

2/2

module system / packages

10/11

module system / file layout

29/30

parser

18/18

compiler features / parser

274/283

compiler features / compilation

31/35

compiler features / flow checker

17/20

compiler features / codegen

5/5

compiler features / emitter

15/15

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

95/109

advanced features / stdlib

71/75

advanced features / keyword

5/5

advanced features / phantom types

134/142

advanced features / obligation stress

23/26

advanced features / obligation matrix

13/13

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

advanced features / type system

3/4

advanced features / auto proc

3/3

advanced features / pattern branches

4/5

advanced features / subflows

26/28

advanced features / optional branches

17/18

advanced features / taps observers

12/14

advanced features / interceptors

0/4

advanced features / phantom types

1/1

advanced features / variants

14/21

advanced features / templating

2/4

advanced features / kernel

49/51

advanced features / testing

13/14

control flow

58/63

runtime features

128/138

runtime features / budgeted interpreter

6/7

runtime features / purity checking

9/10

runtime features / performance

3/20

runtime features / coordination

11/16

runtime features / runtime

30/36

runtime features / resource bridge

44/44

integration testing / negative tests

56/58

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

19/19

stdlib / fmt

9/10

stdlib / io

6/6

stdlib / regex

17/17

stdlib / parser

20/20

stdlib / json

3/3

stdlib / switch

4/4

stdlib / fs

7/9

stdlib / collections

29/32

stdlib / labels

1/1

stdlib / proto

25/25

stdlib / foreign

7/7

stdlib / nested

4/4

stdlib / net

2/2

stdlib / refine

35/35

stdlib / invariants

2/2

stdlib / assumes

2/2

stdlib / todo

4/4

stdlib / trellis

5/7

stdlib / store

254/274

stdlib / store tree

5/5

stdlib / grid

16/16

stdlib / oop

19/19

stdlib / channel

31/35

nesting sweep

37/38

event globbing

6/10

challenges

8/8

aoc 2015

40/44

the world

25/25

examples showcase

1/1

examples showcase / language shootout

31/31

watchdog selftest

1/1