Oryn

A tiny language for game scripting.

Synopsis

Oryn is an embeddable scripting language for games, mods, and interactive simulations. Statically typed. Garbage collected. Ships as a Rust library.

Game entities compose behaviors with use and communicate through typed events. Scripts are synchronous. The host handles async. No null. No exceptions. No inheritance.

What we're building toward

// torch.on

event LightChanged {
    x: f32
    y: f32
    lit: bool
}

obj Torch {
    use Position

    lit: bool

    on Interact(e) {
        self.lit = not self.lit

        emit LightChanged { x: self.x, y: self.y, lit: self.lit }
    }

    on Tick {
        if self.lit {
            emit Light { x: self.x, y: self.y, radius: 4.0 }
        }
    }
}

Features

Statically typed Catch errors at compile time. No nil errors in front of players.
Composable Small objects with focused behavior, assembled with use. No inheritance.
Typed events Objects communicate through declared event types. Compiler-checked.
Embeddable The runtime is a Rust library. Load scripts, broadcast events, drain responses.
Sandboxed No filesystem. No network. Nothing the host doesn't expose.
Tooling from day one LSP, tree-sitter, formatter, test runner. Editor support isn't an afterthought.

Toolchain

Single binary. Everything ships together.

oryn run main.on run a script
oryn build planned
oryn test planned
oryn fmt planned
oryn doc planned
oryn add <git-url> planned