runmat_ignition/
lib.rs

1pub mod bytecode;
2pub mod compiler;
3pub mod functions;
4pub mod gc_roots;
5pub mod instr;
6pub mod vm;
7
8pub use bytecode::{compile, compile_with_functions};
9pub use functions::{Bytecode, ExecutionContext, UserFunction};
10pub use instr::Instr;
11pub use vm::{interpret, interpret_with_vars};
12
13use runmat_builtins::Value;
14use runmat_hir::HirProgram;
15
16pub fn execute(program: &HirProgram) -> Result<Vec<Value>, String> {
17    let bc = compile(program)?;
18    interpret(&bc)
19}