runmat_ignition/
lib.rs

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