Skip to content
Saule
Docs

Lua's simplicity.
Checked before it runs.

A statically typed, class-oriented scripting language. Familiar to anyone who knows Lua, with mistakes caught while you write rather than when you run.

Types you can't ignore

Parameters and fields always state their type, so the boundaries of your code are never guesswork — and inside a body, inference keeps the short-lived things short. What never happens is a silent conversion: where two types don’t line up, that’s a compile error.

nil is opt-in

A variable cannot hold nil unless its type says so with ?. When it can, the compiler makes you deal with it — safe access, a coalescing default, or a force unwrap you had to type out on purpose.

Real classes

Inheritance, interfaces, access modifiers and static members are language constructs with actual declarations — not metatable conventions you rediscover in every codebase.

Exhaustive matching

match takes a value apart and binds what it finds — variants and their payloads, nil, literals, tuples — with guards when a pattern alone isn’t enough. It is an expression, and leaving a case unhandled is a compile error.

Familiar runtime

Tables, closures, multiple return values, coroutines. If you know Lua, you already know how Saule behaves at run time.

Tooling included

A formatter and a language server ship with the compiler. Diagnostics, hover, go-to-definition, inlay hints and formatting in VS Code, Neovim and IntelliJ.

export class Player
local name: string
local health: integer
static maxHealth: integer = 100
fn init(name: string, health: integer)
self.name = name
self.health = health
end
fn damage(amount: integer)
self.health = self.health - amount
if self.health <= 0 then
self.health = 0
println(self.name .. " has fallen")
end
end
end
local p = Player("Arthur", 100)
p.damage(120)
Terminal window
curl -fsSL https://lauriszz123.github.io/saule/install.sh | sh

On Windows:

Terminal window
irm https://lauriszz123.github.io/saule/install.ps1 | iex

Then write a file and run it:

Terminal window
saule run hello.sau

Full instructions, including editor setup, are in the installation guide.