Introduction
brink is a toolchain for inkle’s ink
narrative scripting language, written in Rust. It compiles .ink source to a
compact bytecode format and executes it in a stack-based VM — as a CLI tool, an
embeddable Rust library, or a WASM module behind a web app.
Where to start
The book is in two halves: the toolchain (the engine-neutral core — compile and run stories) and integrations & clients (the things built on top). Jump to what you’re doing:
| You want to… | Start at |
|---|---|
| Write ink and play it from the terminal | Installation → The CLI |
| Drive stories from a Rust program | Your First Story → Embedding the Runtime |
| Ship a story in a Bevy game | Bevy Integration |
| Build a web front-end or editor | Web & WASM · Studio |
| Translate a story | Localization |
| Understand how it works, or hack on it | Concepts · Contributing |
Features
- Full ink language support: choices, gathers, weave, variables, lists, sequences, tunnels, threads, external functions
- Bytecode compiler with multi-file support (
INCLUDEresolution) - Stack-based VM with multi-instance execution (one compiled program, many story instances)
- Localization-ready format with line templates, interpolation slots, and plural categories
- Language server (LSP) and WASM bindings for editor and web integration
- No unsafe code, no panics — strict lint policy
Learning ink
brink implements the ink language as designed by inkle. To learn the language itself, see inkle’s Writing with Ink. This book documents brink — the compiler, runtime, and the things you build with them.
A note on maturity
brink has two ways to produce a runnable story: the native compiler (the
normal path, reads .ink) and a converter that ingests inklecate’s output
as a known-good reference. The native compiler is under active development and
validated against the converter; until it reaches full parity, the converter is
available for stories you already have as .ink.json. See
The Two Pipelines for which to use.