PR #91 added a Wasm host tool runner (WasmTool, WasmToolOptions, load_all(), invoke()) behind the wasm-host-fns feature. Currently the module is private inside the binary crate, so only the CLI can load .wasm tools. Library users already have SandboxBuilder::tool() for registering host functions with native Rust closures — which is arguably more flexible than loading Wasm modules.
So the question is: is there a real use case for library users loading Wasm tool modules programmatically? For example, a host application that lets end-users drop in .wasm plugin files at runtime. If so, a proper library surface would need:
If no compelling use case emerges, keeping it private and CLI-only is the simpler path.
PR #91 added a Wasm host tool runner (
WasmTool,WasmToolOptions,load_all(),invoke()) behind thewasm-host-fnsfeature. Currently the module is private inside the binary crate, so only the CLI can load.wasmtools. Library users already haveSandboxBuilder::tool()for registering host functions with native Rust closures — which is arguably more flexible than loading Wasm modules.So the question is: is there a real use case for library users loading Wasm tool modules programmatically? For example, a host application that lets end-users drop in
.wasmplugin files at runtime. If so, a proper library surface would need:lib.rs(or a dedicated crate) behindcfg(feature = "wasm-host-fns")If no compelling use case emerges, keeping it private and CLI-only is the simpler path.