AsyncGlk

From IFWiki

AsyncGlk
Library
[[File:|385px|center]]
Link Home page
Developer Dannii Willis
Format
Interaction style
System Browser
System details
Latest version
Status Beta
Implements Glk, GlkOte protocol
Uses
Used byParchment
License MIT
Notes
Browse the software database
Edit this infobox

AsyncGlk is a TypeScript implementation of the Glk API, and is heavily based on the original GlkOte library. Like GlkOte, AsyncGlk contains several components which communicate via the GlkOte protocol. However, beyond being ported to TypeScript, it also was written in order to support the newer asynchronous web APIs, such as IndexedDB, or to allow for connecting to Dropbox. The original GlkOte can only use the localStorage functions and so can only store up to 10MB of files, whereas AsyncGlk will allow for GBs or more. (Though the IndexedDB version has not yet been implemented.) Changing to an asynchronous approach would have involved rewriting most of GlkOte, so it was decided to start again using TypeScript.

Components

  • WebGlkOte: a HTML client for the GlkOte protocol, based on GlkOte itself. It supports Glk's stylehints and audio functions, and has been designed for a smoother experience on mobile browsers or with screen readers.
    • CheapGlkOte: a simple Node client, like CheapGlk.
    • RemGlk: a Node client that just outputs the JSON directly; mostly only used for testing.
  • AsyncDialog: an async version of the file dialog.
  • GlkApi: a close port of GlkOte's GlkApi library. It is not used in production by any interpreter and has not been tested thoroughly.
  • GlkAudio: a small Rust library compiled to WebAssembly for decoding AIFF and Ogg/Vorbis as they are not supported in all browsers.