shape-vm 0.3.2

Stack-based bytecode virtual machine for the Shape programming language
Documentation
// ShapeError carries location info for good diagnostics, making it larger than clippy's threshold.
#![allow(clippy::result_large_err)]

//! Shape Virtual Machine
//!
//! A stack-based bytecode VM for executing Shape programs efficiently.
//!
//! Shape is a general-purpose scientific computing language for high-speed
//! time-series analysis. This VM provides fast execution of Shape programs
//! across any domain (finance, IoT, sensors, healthcare, manufacturing, etc.).
//!
//! # Module Structure
//! - `configuration` - BytecodeExecutor struct, constructors, extension registration
//! - `module_resolution` - Module loading, virtual modules, file-based import handling
//! - `execution` - Compilation pipeline, VM execution loop, snapshot resume

pub mod blob_cache_v2;
pub mod bundle_compiler;
pub mod bytecode;
pub mod bytecode_cache;
pub mod compiler;
mod configuration;
pub mod constants;
pub mod debugger;
pub mod deopt;
mod execution;
pub mod executor;
pub mod feature_matrix;
pub mod feature_tests;
pub mod feedback;
pub mod hot_reload;
pub mod linker;
pub mod megamorphic_cache;
pub mod mir;
// JIT tiered compilation support — enabled via `jit` feature on shape-vm.
pub mod memory;
pub mod metrics;
pub mod module_graph;
pub mod module_resolution;
pub mod remote;
pub mod resource_limits;
pub mod stdlib;
pub mod tier;
pub mod type_tracking;

pub use bytecode::{BytecodeProgram, Instruction, OpCode, StringId};
pub use compiler::BytecodeCompiler;
pub use configuration::BytecodeExecutor;
pub use debugger::{DebugCommand, VMDebugger};
#[cfg(feature = "quic")]
pub use executor::clear_quic_transport_config;
#[cfg(feature = "quic")]
pub use executor::configure_quic_transport;
pub use executor::{
    CallFrame, DebugVMState, ExecutionResult as VMExecutionResult, VMConfig, VirtualMachine,
    reset_transport_provider, set_transport_provider,
};
pub use feature_matrix::{FeatureCategory, FeatureTest};
pub use memory::{GCConfig, GCResult, GarbageCollector, ObjectId};
pub use type_tracking::{FrameDescriptor, NativeKind, StorageHint, TypeTracker, VariableTypeInfo};

// Re-export error/context types from shape-value
// (Upvalue/VMContext deleted per ADR-006 §2.7.8 — closure capture is now
// kind-extended raw bits via ClosureCell, not a wrapper enum.)
pub use shape_value::{ErrorLocation, LocatedVMError, VMError};

#[cfg(test)]
pub(crate) mod test_utils;

#[cfg(test)]
#[path = "lib_tests.rs"]
mod tests;