Documentation

Learn Kria from basics to advanced topics with comprehensive guides and examples.

  • Getting Started
  • Language Basics
  • Control Flow
  • Functions & Closures
  • Arrays & Objects
  • Modules & Imports
  • Input / Output
  • Built-in Functions
  • Performance
  • Architecture

Welcome to Kria Documentation

Kria is a dynamically typed programming language with 64-bit integer and double-precision floating-point numbers, implemented in Rust. Kria 2.0.0 uses an LLVM-based JIT by default for source files and RegisterVM for the interactive REPL.

Each section explains current syntax and runtime behavior, with examples aligned to the kria-lang repository.

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, integer and float arithmetic, comparisons, and logical operators.

Control Flow

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

Functions & Closures

Named functions, lambdas, return, positional parameters, and closures with captured variables.

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 / Output

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

Built-in Functions

Complete reference for print(), type(), wait(), and other built-in functions.

Performance & Optimization

Best practices, algorithm patterns, performance tips, and optimization techniques.

Architecture

Compilation pipeline, the LLVM JIT and RegisterVM backends, and performance optimizations.