Home

Awesome

Emglken: Glk meets Emscripten

Over the years many Interactive Fiction interpreters have been written which use the Glk API, or have been adapted to do so. Emglken takes some of these interpreters, compiles them to use the RemGlk Glk library using Emscripten, and then outputs to Javascript and WebAssembly. These interpreters, which once needed to be compiled for each distinct operating system and CPU combination, can now be run anywhere there's a modern Javascript runtime: on the web with Parchment, in desktop apps like Lectrote, or in Node.js directly.

Emglken itself doesn't have a lot of code, RemGlk does most of the work for us. What Emglken does provide is a virtual file system for Emscripten which lets RemGlk think it is running on a normal Linux filesystem, but is actually transformed to use GlkOte's Dialog API. Emglken also provides a common interpreter interface to handle setting up the connections between each interpreter and GlkOte.

npm package and console app

Emglken has been published to the npm package repository. You can install the emglken package and use each interpreter as you wish. A basic console app is also provided, just run emglken with the path to the storyfile you want to run.

emglken storyfile.gblorb

Included Projects

Both RemGlk and the Emglken customisations are MIT licensed, as are some of the interpreters, but others are licensed under other Free Software licenses as listed below.

NameUpstream repoLicense
Bocfelgarglk/garglkGPL-2.0/GPL-3.0
GitDavidKinder/GitMIT
Glulxeerkyrath/glulxeMIT
Hugohugoif/hugo-unixBSD-2-Clause
RemGlkerkyrath/remglkMIT
Scaregarglk/garglkGPL-2.0
TADStads-intfic/tads-runnerGPL-2.0