MiraScript for Rust
mirascript is the batteries-included Rust interface to the MiraScript compiler
and virtual machine. It re-exports the complete mirascript-vm API, including
the MiraRecord and MiraArray derive macros.
Compilation and execution are independent. A compiled script is reusable, while the runtime owns globals, standard-library values, execution state, and its arena:
use ;
let script = compile?;
let mut runtime = new;
runtime.insert_global?;
assert_eq!;
# Ok::
Compiler configuration and bytecode definitions are available through core,
and the complete runtime crate is also available as vm.
let config = new;
let script = compile_with?;
let mut runtime = new;
assert_eq!;
# Ok::