pub struct VM { /* private fields */ }Expand description
Glyph Virtual Machine
Immutable-first execution model:
- All values are immutable
- Bindings are immutable (no reassignment)
- Collections operations create new collections
- Side effects only through capability-controlled intrinsics
Implementations§
Source§impl VM
impl VM
Sourcepub fn load_bytecode(&mut self, bytecode: Vec<Vec<Instruction>>)
pub fn load_bytecode(&mut self, bytecode: Vec<Vec<Instruction>>)
Load bytecode into the VM
Sourcepub fn check_capability(&self, capability: &str) -> Result<(), VMError>
pub fn check_capability(&self, capability: &str) -> Result<(), VMError>
Check if a capability is granted
Sourcepub fn clear_telemetry(&mut self)
pub fn clear_telemetry(&mut self)
Clear telemetry data
Sourcepub fn memory_usage(&self) -> usize
pub fn memory_usage(&self) -> usize
Get current memory usage
Sourcepub fn memory_usage_percentage(&self) -> f64
pub fn memory_usage_percentage(&self) -> f64
Get memory usage percentage
Auto Trait Implementations§
impl Freeze for VM
impl !RefUnwindSafe for VM
impl Send for VM
impl Sync for VM
impl Unpin for VM
impl !UnwindSafe for VM
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more