v0.1.0-alpha open source systems language

Kairo: The Language Beyond C++

stage(0) compiler: C++

stage(1) self-hosting: in progress

See it in action. Clean syntax. No magic.

hello.k kairo
import std::io::println  // import only what you need

// No main() required: a file with top-level code is a script, run top to bottom.
const name  = "Kairo"
var   count = 0

for i in 0..5 {
    println(f"Hello, {name}! {i} squared is {i * i}.")
    count++
}

println(f"Ran {count} times.")

Simple, clean syntax

  • Type inference Write var count = 0 and the compiler knows it's an integer. Annotate when you want to, not because you have to.
  • String interpolation f"" strings embed any expression directly, {i * i} included. No concatenation, no format specifiers.
  • Top-level code Skip the main() boilerplate. A file with top-level statements is a script: they run in order, as the program.

Install Kairo

Alpha 0.2.0: the compiler is written in Kairo and builds itself. APIs may change.

Full Install Guide
~/kairo - sh tty1
Quick install
curl -fsSL https://kairolang.org/install.sh | sh
From source (needs a 0.2.0+ release on PATH as the seed)
git clone https://github.com/kairolang/kairo.git && cd kairo
git submodule update --init --recursive
python3 build.py --release kairo kcc kld kfmt

The source
is open.

Compiler, standard library, and toolchain are on GitHub. Apache 2.0 with runtime exception.