Skip to main content

run_snapshot

Function run_snapshot 

Source
pub fn run_snapshot(bytes: &[u8]) -> String
Expand description

Execute .mbc snapshot bytes on the cycle-collecting VM — the browser twin of monkey-gc run foo.mbc, running the same VM with raise-site error classification so the envelope can carry a stable kind.

The buffer is untrusted input: it goes through the validating snapshot reader before the VM. Failures are data in the envelope — stage snapshot when the bytes are rejected, runtime when the VM errors (the span is only present when the snapshot kept its debug info).