Skip to main content

Module wasm_runtime

Module wasm_runtime 

Source
Expand description

WebAssembly Component Model runtime for kind = Wasm skills.

Loads plain .wasm components, validated and compiled by the current runtime at load time. Native precompiled .cwasm inputs are refused; discovered files have no protected provenance authorizing deserialization. Components target the uar:skill@0.1.0 WIT world and dispatches the run(input: string) -> result<string, string> export.

Behind the existing wasm-runtime Cargo feature.

Structs§

WasmHostState
Host state for a wasm skill instance.
WasmSkillRuntime

Functions§

builtin_wasm_dir
Returns the resolved built-in WASM skill dir. Honours UAR_SKILLS_WASM_BUILTIN_DIR; falls back to crates/prometheus-skill-system/skills (any skill.wasm discovered alongside a SKILL.md).
discover_and_load
Scan both directories for plain .wasm components and register each into runtime. Discovered .cwasm entries produce an actionable load refusal and are never deserialized. Returns one Skill per loaded component, suitable for SkillService::register_builtins.
user_wasm_dir