Documentation

Learn Kria from basics to advanced topics. Detailed guides for each section are coming soon.

  • Getting Started
  • Language Basics
  • Control Flow
  • Functions & Closures
  • Arrays & Objects
  • Modules & Imports
  • Input
  • Architecture

Quick start

Save a file as hello.krx and run it with kria hello.krx:

set x = 5
set y = 3
print(x + y)

Or start the REPL: kria with no arguments.

Documentation sections

Getting Started

Install Kria, run your first .krx file, and use the interactive REPL with meta commands.

Language Basics

Variables with set, dynamic types, arithmetic, comparisons, and logical operators.

Control Flow

if / elseif / else, while, for-in, break, and continue.

Functions & Closures

Named functions, lambdas, return, parameters, and copy-on-create closure capture.

Arrays & Objects

Mutable [...] and immutable #[...] arrays, objects, indexing, and deep equality.

Modules & Imports

export fn, import alias from "./file.krx", and multi-file project layout.

Input

Read from stdin with input<str>, input<int>, and input<float>.

Architecture

Lexer, parser, compiler, flat bytecode, constant pool, and stack-based VM with optimizations.

Full guides for each section will be added in future updates. For now, refer to the kria-lang repository for the complete language reference.