Features

Everything Krypton ships, organized so you can skim or dive in.

Native Compilation Pipeline

PlatformBackendOutput
Linux x86_64elf.kStatic ELF, direct syscalls, no libc
Windows x86_64x64.kPE/COFF, kernel32 via krypton_rt.dll
macOS arm64macho.kMach-O with ad-hoc code signing

Language Features

Functions

func add(a, b) {
    emit a + b
}

Lambdas

let dbl = func(x) { emit x * 2 }
kp(dbl(5))  // 10

Pattern Matching

match color {
    "red" { kp("warm") }
    else  { kp("other") }
}

Structs

struct Point { let x; let y }
let p = Point { x: 10, y: 20 }

Try/Catch

try {
    throw "oops"
} catch e { kp(e) }

String Interpolation

kp(`Hello, {name}!`)

Standard Library

~150 built-in functions plus 36 stdlib modules covering I/O, strings, numbers, lists, maps, structs, JSON, CSV, math, sorting, and more.

Native Performance

Direct Syscalls

Linux: hello.k compiles to a 2.6 KB static ELF.

Smart-Int Values

Small integers unboxed in registers. 1 + 2 is two instructions.

Bump Allocator

Single mmap region, bump pointer. Allocation is one ADD.