Skip to main content

Module engine

Module engine 

Source
Expand description

wasmtime::Engine factory + sandbox knobs.

We build the engine once per runtime instance (engines are cheap to share — modules are the heavy thing) and clone it into every store. The configuration is the single source of truth for what “sandboxed” means in outl:

  • Fuel on (consume_fuel = true) → caller decides how many instructions a run gets.
  • Epoch interruption on → caller bumps the engine’s epoch from a timer thread for wall-clock cancellation. Today crate::sandbox::with_timeout still does the thread-based timeout; the epoch path is wired up so an upcoming refactor can move to it without a config churn.

Structs§

SandboxLimits
Sandbox limits a single execute call may use.

Functions§

make_engine
Build a wasmtime::Engine with the outl sandbox configuration. Cheap to call; reuse the result across WasmModule instances when possible.