Skip to main content

Module wasm_runtime

Module wasm_runtime 

Source
Expand description

WebAssembly Component Model runtime for kind = Wasm skills.

Loads .wasm (JIT-compiled by Cranelift at load time) or .cwasm (AOT-precompiled via wasmtime compile) components targeting 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 .wasm / .cwasm files and register each into runtime. Returns a vector of Skill records (one per loaded component) suitable for SkillService::register_builtins.
user_wasm_dir