v0.1.0-alpha open source systems language

Kairo: The Language Beyond C++

stage(0) compiler: C++

stage(1) self-hosting: in progress

dot_product.k kairo
import std::Parallel
import std::Error::DimensionError
import std::Interfaces::Numeric

fn <T impl Numeric> dot(a: [T], b: [T]) -> T {
    if a.length() != b.length() {
        panic DimensionError("dot requires equal lengths")
    }

    var result = Parallel::reduce(
        policy:  Parallel::Policy::SIMD,
        range:   0..(a.length()),
        init:    T(),
        step:    fn (i: usize)   -> T = a[i] * b[i],
        combine: fn (x: T, y: T) -> T = x + y
    )

    return result
}

test "dot product of two vectors" {
    var a, b = [1, 2, 3, 4, 5], [6, 7, 8, 9, 10]
    var result = dot(a, b)
    assert result == 130, f"expected 130, got {result}"
}
-- KAIRO -- dot_product.k 25 lines utf-8 EOF

Project stats

$ kairo stats --repo kairolang/kairosnapshot 2026-10-25
GitHub Stars
385+
Weekly Downloads
55+
Contributors
5
Forks
4

See it in action. Clean syntax. No magic.

hello.k kairo
import std  // import only what you need

// No main() required top-level code runs immediately
// or is callable when imported as a module.
const name  = "Kairo"
var   count = 0

for i in 0..5 {
    std::print(f"Hello, {name}! Count is {count}.")
    count++
}

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

Simple, clean syntax

  • Type inference Write var count = 0 the compiler knows it's an integer. Annotate when you want to, not because you have to.
  • String interpolation f"" strings let you embed expressions directly. No concatenation, no format specifiers.
  • Top-level code Skip the main() boilerplate. Code at the top level runs on execution and can still be imported as a module.

Install Kairo

Alpha Stage 1 is written in Kairo and built by Stage 0. APIs may change.

Full Install Guide
~/kairo - sh tty1
Quick install
curl -fsSL https://kairolang.org/install.sh | bash
From source
git clone https://github.com/kairolang/kairo.git && cd kairo-lang && xmake build -j8

The source
is open.

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