Expand description
WebAssembly sandbox — the uniform execution path that every language can eventually share.
Today only the crate::runtimes::rust runtime uses it (because
Rust has no in-process interpreter — we compile to wasm32-wasip1
and run via wasmtime). Tomorrow the in-process interpreters
(Steel, Boa, RustPython, mlua) will be swapped for WASM-built
equivalents and route through the same code path.
Gated behind the wasm Cargo feature.
§Pieces
engine— builds awasmtime::Engineconfigured with the uniform sandbox: WASI with no preopens / no env / no sockets, wall-clock timeout via epoch interruption, optional instruction limit via fuel.module—WasmModule, the adapter that takes a WASI module binary plus a source string, runs it through wasmtime, and produces ancrate::ExecOutput. Implementscrate::Runtime.cache—~/.cache/outl/runtimes/on Linux,~/Library/Caches/outl/runtimes/on macOS, etc. Lazy-generated.wasmblobs (today: Rust source → WASM) land here keyed by SHA-256 of the source.
Re-exports§
pub use cache::cache_dir;pub use cache::cache_path_for_source;pub use engine::make_engine;pub use engine::SandboxLimits;pub use module::WasmModule;
Modules§
- cache
- Lazy generation cache for
.wasmmodules. - engine
wasmtime::Enginefactory + sandbox knobs.- module
WasmModule— the adapter that turns a WASI.wasmbinary into acrate::Runtime.