Expand description
Re-export shim for the wasmtime primitives. Every consumer (Session, natives, future sshd integration) imports through this module so swapping the underlying implementation never touches more than one path.
The implementation lives in scripting::runtime so the entity-script
ScriptExecutor and the rpc eval channel share one engine builder, one
ModuleCache, and one trap-classification helper. See ADR 0011 in the
plan for the dedup rationale.
Structs§
- Engine
Opts - Module
Cache - Per-engine bytecode cache keyed by the full module bytes. Cloning a
ModuleCacheyields a handle into the same inner map; meant to be shared between long-lived hosts (Session, ScriptExecutor) and any per-form helpers that need the same cached compilation.
Enums§
Functions§
- build_
engine - call_
i64_ export - Instantiates
moduleagainst an empty linker and calls a zero-arg export returning a singlei64. Constraints (fuel cap, epoch deadline) come from the caller-suppliedStore. - classify_
runtime_ error - Classifies a [
wasmtime::Error] thrown during execution into a typedEngineError. Downcast to [wasmtime::Trap] handles the structured fuel/epoch cases; everything else falls through asTrap(message). - compile_
module - compile_
wat