Documentation
Learn Kria from basics to advanced topics with comprehensive guides and examples.
Welcome to Kria Documentation
Kria is a dynamic programming language with a focus on clarity and performance. These comprehensive guides cover everything from your first program to advanced patterns and optimization techniques.
Each section includes detailed explanations and runnable code examples from 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, 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 / 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, bytecode format, stack-based VM, and performance optimizations.