Getting Started
Install Kria, run your first program, and explore the interactive REPL.
Prerequisites
To build Kria from source, you need Rust 2021 edition or later. Install Rust using rustup.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Installation
Clone the repository and build Kria in release mode:
git clone https://github.com/krialabs/kria-lang.git
cd kria-lang
cargo build --release
The compiled binary will be at target/release/kria.
You can add it to your PATH or run it directly.
Your First Program
Create a file named hello.krx:
set x = 5
set y = 3
print(x + y)
Run it with:
./target/release/kria hello.krx
Output: 8
Interactive REPL
Start the interactive Read-Eval-Print Loop with no arguments:
./target/release/kria
The REPL provides a persistent session where variables and functions stay in scope until you reset or exit.
Meta Commands
:help— Show available commands:reset— Clear all variables and functions:exit— Exit the REPL
Try this in the REPL:
set name = "Kria"
print(name)
fn greet(x) { return "Hello, " + x }
greet(name)
Next Steps
Now that you have Kria running, explore the other documentation sections:
- Language Basics — Learn about variables, types, and operators
- Control Flow — Master if/else, loops, and jumps
- Functions & Closures — Define and use functions
- Arrays & Objects — Work with collections