#glk #glulx #if #blorb

glulxe

Bindings to the Glulxe interpreter for interactive fiction

3 unstable releases

0.2.0 Nov 4, 2019
0.1.1 Oct 15, 2019
0.1.0 Oct 15, 2019

#3 in #glk


Used in glk

MIT/Apache

6KB

glulxe-rs

This crate provides a binding from Rust to the Glulxe interpreter for interactive fiction, an implementation of the glulx specification. The crate embeds the glulx interpreter.

For this to work, the binary using the crate needs to provide handlers for the Glk functions that the interpreter will invoke, see the glk crate for this.

How to use

The crate provides two functions:

  • To initialize and configure the interpreter, call glulxe::init(gamefile) where gamefile is an open Glk stream that contains the story file to run.

  • To start the interpreter, call glulxe::main().

From there on, Glulxe takes over execution on that thread. It will call glk_exit() when execution is done.

To do

  • Currently the VM_DEBUGGER is not supported. It might be offered as a crate feature. This would need a dependency on the C library libxml.

Example: toyglk

The glk crate has an example of using this crate to implement a glulx story file interpreter.

Alternatives

  • There is the glulx crate that implements a Glulx interpreter in native rust, however it is not currently (as of end 2019) far enough along to run story files.

License

Licensed under either of

at your option.

(note that the inner crate, glulxe-sys is licensed under a MIT license only, because it is based on files from glulxe which are licensed such)

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~0.5–2.6MB
~55K SLoC