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.

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".

Quick example

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

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

Download & Installation

Get started with Kria in just a few steps. You can build from source with Rust or use platform-specific installation scripts.

Prerequisites

Before building Kria, make sure you have the Rust toolchain installed on your system. If you don't have Rust yet, visit the official installer.

Build from source

1. Development build

cargo build

This creates a debug build. Useful for development and testing.

2. Release build (recommended)

cargo build --release

This creates an optimized release binary. The binary is located at target/release/kria.

3. Install to your system

For Linux / macOS:

cd release
./build.sh install

This installs Kria to ~/.kria/bin. Make sure this directory is in your PATH.

Run Kria

Interactive REPL

kria

Starts the interactive REPL where you can write and execute Kria code. Variables and functions persist until you exit or reset.

REPL commands:

Check version

kria -v
# or
kria --version

Run a source file

kria test.krx

Execute a Kria program from a .krx file.

Platform-specific installation

Windows

To create an installer, you'll need NSIS.

cargo build --release
cd release
makensis kria-setup.nsi
# Then run the installer
release\kria-1.0.0-windows-x86_64-setup.exe

Linux / macOS

Install to ~/.kria/bin (make sure it's in your PATH).

cd release
./build.sh install

Create a distributable archive:

./build.sh package

Creates kria-<version>-<os>-<arch>.tar.gz

VS Code extension

Enhance your Kria development experience with the official VS Code extension. Get syntax highlighting, code completion, and go-to-definition support.

Install the Kria VS Code extension

What's next?

Once you've installed Kria, try running a simple script:

kria test.krx

Check out the full source code and releases on GitHub, or dive into the documentation to learn the language.