Crates.io | glulxe |
lib.rs | glulxe |
version | 0.2.0 |
source | src |
created_at | 2019-10-15 19:03:57.419559 |
updated_at | 2019-11-04 20:28:41.010691 |
description | Bindings to the Glulxe interpreter for interactive fiction |
homepage | |
repository | https://gitlab.com/vmedea/glulxe-rs |
max_upload_size | |
id | 172772 |
size | 5,056 |
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.
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.
VM_DEBUGGER
is not supported. It might be offered as a crate feature.
This would need a dependency on the C library libxml
.The glk
crate has an example of using this crate to implement a glulx story
file interpreter.
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)
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.