1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//! fusevm — Language-agnostic bytecode VM with fused superinstructions.
//!
//! Any language frontend can compile to fusevm opcodes and get:
//! - Fused superinstructions for hot loops (AccumSumLoop, etc.)
//! - Extension opcode dispatch for language-specific ops
//! - Stack-based execution with slot-indexed fast paths
//! - Cranelift JIT compilation for eligible chunks
//!
//! ## Architecture
//!
//! ```text
//! stryke source ──→ stryke compiler ──┐
//! awkrs source ──→ awkrs compiler ├──→ fusevm::Op ──→ VM::run()
//! zshrs source ──→ shell compiler ──┘
//! ```
//!
//! ## Usage
//!
//! ```rust
//! use fusevm::{Op, ChunkBuilder, VM, VMResult, Value};
//!
//! let mut b = ChunkBuilder::new();
//! b.emit(Op::LoadInt(40), 1);
//! b.emit(Op::LoadInt(2), 1);
//! b.emit(Op::Add, 1);
//!
//! let mut vm = VM::new(b.build());
//! match vm.run() {
//! VMResult::Ok(val) => println!("result: {}", val.to_str()),
//! VMResult::Error(e) => eprintln!("error: {}", e),
//! VMResult::Halted => {}
//! }
//! ```
pub use ;
pub use ;
pub use Op;
pub use Value;
pub use ;