Skip to main content

Crate mimobox_wasm

Crate mimobox_wasm 

Source
Expand description

mimobox-wasm: Wasm sandbox backend.

Implements a Wasm sandbox on top of the Wasmtime runtime with WASI Preview 1 support. Core design:

  • Globally shared Engine, owned by WasmSandbox and reused across multiple execute calls.
  • Module compilation cache based on SHA256 hashes of file content to avoid repeated compilation.
  • Independent Store per execute, with a fresh WASI context and resource limits.
  • stdout/stderr captured into in-memory buffers through MemoryOutputPipe with a built-in capacity limit.
  • Dual execution-time limits with fuel and epoch interruption.

Structs§

WasmSandbox
Wasm sandbox backend.

Functions§

run_wasm_benchmark
Runs the Wasm sandbox cold-start benchmark.