Getting started
To try the language immediately, open the browser playground. Its controls guide explains Run, Debug, and token help. For the local interpreter and REPL, build Kata from a source checkout with Rust and Cargo installed. The commands below run from the repository root.
git clone https://github.com/alkemdotdev/kata.gitcd katacargo buildThe executable is target/debug/kata. You can also run it through Cargo; the -- separates Cargo’s arguments from Kata’s arguments.
Write a script
Section titled “Write a script”Save this as hello.ks:
let name = "world"print("hello, {name}")
func double(n: Int): Int { ret n * 2}
print(double(21))Run it:
cargo run -- ks hello.ksThe program prints:
hello, world42let introduces a binding. Double-quoted strings evaluate expressions inside braces. func defines a function, and ret returns its result. The Int annotations are checked when the program runs.
Explore interactively
Section titled “Explore interactively”cargo run -- replTry entering these lines one at a time:
let score = 20score = score + 1score * 2The REPL retains bindings between submissions and displays expression results. Tab opens completion; Ctrl+C cancels the current input; Ctrl+D exits. For longer experiments, a .ks file makes the program easy to rerun. See the REPL caveats if input or error recovery behaves unexpectedly.
Run a complete example
Section titled “Run a complete example”The documentation’s examples live in the same checkout:
cargo run -- ks site/examples/fibonacci.ksRead the Fibonacci walkthrough, then continue with syntax and values.
The standard library is embedded when Kata is built. Changes to std/ need a rebuild; you do not need a separate library installation to run the executable.