version 0.5
Citril
A small, readable scripting language — simple to write, and built to be embedded.
Citril has an end-delimited, Lua-flavoured syntax that stays easy to
read, a dynamic core you can learn in an afternoon, and a C++ implementation
designed to drop into a larger project as its scripting layer.
Download Citril v6 · Windows · free download
What it looks like
function greet(name)
return "Hello, " + name + "!"
end
let players = ["Ada", "Alan", "Grace"]
for p in players do
print("${greet(p)} welcome back.")
end
Why Citril
- Readable — blocks close with
end; no punctuation soup, no whitespace traps. - Two back ends — a tree-walking interpreter for clarity, and a bytecode VM that runs 10–24× faster.
- Batteries included — ~75 built-ins: lists, maps, strings, math, higher-order functions.
- Nice to work with — string interpolation
"${x}", compound assignment, and clear error messages with a caret at the exact spot. - Made to embed — ships as a C++ library so a host application can run scripts and expose its own functions. See Embedding.
Quick start
Citril builds with CMake and a C++17 compiler.
cmake -S . -B build
cmake --build build --config Release
# run a program (bytecode VM by default)
citril examples/tour.citril
# or the tree-walking interpreter
citril --tree examples/tour.citril
Embedding in a game engine? Citril is designed to be the scripting layer inside a larger C++ program. The Embedding guide walks through linking the library, exposing engine functions to scripts, and calling script functions each frame.