The Koru Book

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

Tests: 1895
✓ 1725 passing
✗ 3 failing
○ 153 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

23/25

core language / events flows

38/40

core language / literals

7/8

core language / type system

3/4

core language / control flow

31/32

module system / imports

26/32

module system / comptime mirror

48/48

module system / namespaces

2/2

module system / packages

10/11

module system / file layout

27/28

parser

12/12

compiler features / parser

195/204

compiler features / compilation

23/27

compiler features / flow checker

14/17

compiler features / codegen

3/3

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

85/99

advanced features / stdlib

50/52

advanced features / keyword

5/5

advanced features / phantom types

129/137

advanced features / obligation stress

22/25

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

3/4

advanced features / subflows

22/24

advanced features / optional branches

11/12

advanced features / taps observers

12/14

advanced features / interceptors

0/4

advanced features / phantom types

1/1

advanced features / variants

13/20

advanced features / templating

2/4

advanced features / kernel

41/43

advanced features / testing

12/13

control flow

29/33

runtime features

114/124

runtime features / budgeted interpreter

6/7

runtime features / purity checking

9/10

runtime features / performance

2/20

runtime features / coordination

11/16

runtime features / runtime

27/33

runtime features / resource bridge

21/21

integration testing / negative tests

54/56

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

16/16

stdlib / parser

14/14

stdlib / switch

4/4

stdlib / fs

7/9

stdlib / collections

29/32

stdlib / labels

1/1

stdlib / proto

14/14

stdlib / foreign

6/6

stdlib / nested

4/4

stdlib / net

2/2

stdlib / refine

19/19

stdlib / invariants

2/2

stdlib / assumes

2/2

stdlib / todo

4/4

stdlib / trellis

5/7

stdlib / store

205/227

stdlib / store tree

5/5

stdlib / grid

14/14

nesting sweep

34/35

event globbing

3/10

challenges

3/3

aoc 2015

40/44

the world

25/25

examples showcase

1/1

examples showcase / language shootout

30/30

watchdog selftest

1/1