Zorb

Zorb compiles Z-machine story files (versions 1-5, 7, and 8) into standalone WebAssembly binaries. Version 6 is not supported.

The output is a single .wasm module with the story data embedded, so a host only needs to instantiate it and provide the zio import namespace described in CAPSULE_HOST.md. Compilation takes roughly 1 ms per story.

Requirements

Installation

def deps do
[
{:zorb, "~> 0.13.0"}
]
end

Usage

wasm = Zorb.compile("path/to/story.z5", cache: true)
File.write!("story.wasm", wasm)

Options:

How It Works

Zorb does not interpret story data at runtime. The interpreter logic and the story data are baked into one WASM module, specialized to that story's version:

Documentation

Development

Run the test suite:

mix test

For additional Z-machine test files and stories, see the zifmia repository.