Kria · krx

Kria Programming Language

A dynamic, strongly typed language with a flat bytecode VM and combined loop instructions for high-performance execution. Write .krx files or use the interactive REPL.

How it works

Source Lexer Parser Compiler VM

Kria compiles source into flat bytecode with a constant pool, then runs it on a stack-based VM with call frames for functions and closures.

Features

Interactive REPL

Run kria with no arguments. Persistent session, multi-line input, and command history.

Functions & Closures

Named functions, lambdas, and nested closures with copy-on-create capture semantics.

Arrays & Objects

Mutable and immutable arrays, object literals, deep equality, and for-in iteration.

Modules

Multi-file projects with export fn and import alias from "./file.krx".

Performance

Combined loop opcodes like OP_LOOP_INC_LESS reduce hot-path dispatch overhead.

Dynamic Typing

Strong, dynamic types with null for undefined variables. Newline-based statements, no semicolons.

Quick example

fn greet(name) {
    return "Hello, " + name
}

set message = greet("Kria")
print(message)
Explore documentation