Learn Koru

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

Tests: 2614
✓ 2443 passing
✗ 3 failing
○ 154 planned
A hand-written book and a formal spec are in progress as Koru stabilizes. Until they land, this suite — real compiler regression tests — is the reference. Browse by example below.

core language / basic syntax

24/25

core language / events flows

41/44

core language / literals

7/9

core language / type system

3/4

core language / control flow

38/39

module system / imports

28/34

module system / comptime mirror

61/61

module system / namespaces

2/2

module system / packages

10/11

module system / file layout

33/34

parser

18/18

compiler features / parser

290/299

compiler features / compilation

41/45

compiler features / flow checker

22/25

compiler features / codegen

9/9

compiler features / emitter

23/23

compiler features / std library

5/5

compiler features / template engine

9/9

compiler features / subflow

1/1

syntax / struct constructors

2/2

advanced features / comptime

105/119

advanced features / stdlib

71/75

advanced features / keyword

5/5

advanced features / phantom types

145/151

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

13/15

advanced features / interceptors

0/4

advanced features / phantom types

1/1

advanced features / variants

14/21

advanced features / templating

2/4

advanced features / kernel

54/56

advanced features / testing

13/14

control flow

62/67

runtime features

158/167

runtime features / budgeted interpreter

6/7

runtime features / purity checking

9/10

runtime features / performance

3/20

runtime features / coordination

13/18

runtime features / runtime

30/36

runtime features / resource bridge

54/54

runtime features / node

6/6

runtime features / cell

10/10

runtime features / fleet

15/15

integration testing / negative tests

60/62

integration testing / negative tests / 020 parse errors

1/1

integration testing / negative tests / 034 type errors

1/1

integration testing / bug reproduction

4/4

integration testing / validation

10/10

stdlib / benchmarking

2/2

stdlib / string

21/21

stdlib / num

41/41

stdlib / fmt

21/21

stdlib / io

7/7

stdlib / regex

17/17

stdlib / parser

20/20

stdlib / json

4/4

stdlib / compress

0/3

stdlib / rand

1/1

stdlib / switch

4/4

stdlib / fs

8/10

stdlib / collections

33/36

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 / panic

6/6

stdlib / tree

19/19

stdlib / store

273/293

stdlib / store tree

11/11

stdlib / ctx

12/12

stdlib / grid

24/24

stdlib / oop

19/19

stdlib / channel

31/35

nesting sweep

38/39

event globbing

8/12

challenges

9/9

aoc 2015

40/44

demonstrations

8/8

the world

25/25

examples showcase

1/1

examples showcase / language shootout

31/31

watchdog selftest

1/1