vibe/bytecode/mod.rs
1//! `vibe-bc-0.1` bytecode compiler, VM, and binary codec.
2//!
3//! Stack-based bytecode for VibeScript 0.1. Compiles a checked `Program`
4//! AST into a `Chunk`, which can be executed by the `Vm` or serialized
5//! to/from bytes.
6//!
7//! ## Module layout
8//!
9//! - [`op`] — opcode definitions, `Chunk`, `Const`, `FuncMeta`
10//! - [`compiler`] — AST → `Chunk` compiler
11//! - [`vm`] — stack-based virtual machine
12//! - [`codec`] — binary encode/decode of `Chunk`
13
14pub mod codec;
15pub mod compiler;
16pub mod op;
17mod task_admission;
18#[cfg(test)]
19mod task_admission_tests;
20pub mod vm;
21
22pub use codec::{decode_chunk, encode_chunk, ChunkDecodeError};
23pub use compiler::{compile, compile_expr, CompileError};
24pub use op::{Chunk, Const, FuncMeta, Op, MAGIC, MAX_CODE, MAX_CONSTANTS, MAX_FUNCTIONS, VERSION};
25pub use vm::{Vm, VmError};