No description
Find a file
2026-04-21 14:40:40 -06:00
examples refactor: make room for loading and outputting pre-compiled files 2026-04-13 18:40:04 -06:00
include refactor: make room for loading and outputting pre-compiled files 2026-04-13 18:40:04 -06:00
src feat: loading precompiled sections, strings/constants/knots 2026-04-20 23:02:32 -06:00
.gitignore feat: improved parsing and regression test suite 2026-02-27 18:25:13 -07:00
build.zig chore: bump zig version to 0.16.0 2026-04-15 13:20:17 -06:00
build.zig.zon chore: bump zig version to 0.16.0 2026-04-15 13:20:17 -06:00
README.md chore: update README 2026-04-21 14:40:40 -06:00

Ink

Ink is a narrative scripting language developed by Inkle, designed to allow writers and game designers to express branching narrative in a natural way. It has powered many of Inkle's titles such as 80 Days, Heavens Vault, and Overboard!.

This project aims provides a modern, highperformance implementation of Ink aimed at game engines and custom tooling pipelines, imposing minimal runtime overhead, and even usable in constrained environments.

📝 Experimental This project is in an early, unstable state. Breaking changes are expected. Only use in production if you're super rad.

Installation

Build From Source

This project tracks the latest release of the Zig compiler (0.16.x), and requires LLVM 21.x to generate its code.

git clone https://codeberg.org/haxolotl/ink
cd ink
zig build -Doptimize=ReleaseSafe

Project Goals

Performance

The canonical Ink implementation is written in C#, and integrates well for Unity. Unfortunately, it is not optimized for software developed in unmanaged languages, such as C or C++, giving rise to competing runtimes such as JBenda's wonderful inkcpp.

Our goal is to build the fastest, most efficient Ink compiler and runtime, with:

  • A compact, pre-compiled binary format
  • A stackbased virtual machine designed for predictable performance
  • Zeroallocation execution paths where possible

Ease of Integration

Ink should be trivial to embed in any engine or toolchain. This implementation is designed to be:

  • Languageagnostic — usable from C, C++, Rust, Zig, C#.
  • Engineagnostic — simple to integrate into Unity, Unreal, Godot, or custom game engines.
  • Buildsystem friendly — self-contained within its generated library file, without any dependencies.

Developer Tooling

Writers and developers deserve tooling that naturally fits into their workflow. This implementation aims to support:

  • Better error messages and reporting
  • Fast commandline compilation
  • Binary introspection and runtime tracing
  • AST and IR introspection
  • Integration hooks for editor extensions and custom pipelines (coming soon!)

What is supported?

This implementation currently only supports the minimum language features to be a usable compiler and runtime for most projects. The following features are not currently supported, but planned for the near future:

  • Tags
  • Tunnels
  • Lists
  • Sequences

When will there be a stable release?

Our benchmark for when the first stable release can be tagged is the ability to compile and run The Intercept, a sample of a real-world Ink story created by Inkle.

Support

If you like this project and want to support its continued development, consider buying me a coffee. This code ain't gonna write itself!