When using wasmtime run with a component that doesn't export wasi:cli/run at a supported version, we currently print a message along the lines of
Error: failed to run main module `target/wasm32-wasip2/debug/test_wasip3.wasm`
Caused by:
no exported instance named `wasi:cli/run@0.2.12`
Ideally, we'd instead print something like this:
Error: failed to run component `target/wasm32-wasip2/debug/test_wasip3.wasm`
The component doesn't export any of the supported handlers. The component must export at least one of:
an instance of the interface `wasi:cli/run@0.2`
an instance of the interface `wasi:cli/run@0.3`
Note the absence of a patch version: we support 0 of both, and shouldn't indicate a higher requirement than we actually have.
(Note also the change to the first line, replacing "main module" with "component" as well.)
Oh, and all of this applies to wasmtime serve with slight modifications as well.
When using
wasmtime runwith a component that doesn't exportwasi:cli/runat a supported version, we currently print a message along the lines ofIdeally, we'd instead print something like this:
Note the absence of a patch version: we support
0of both, and shouldn't indicate a higher requirement than we actually have.(Note also the change to the first line, replacing "main module" with "component" as well.)
Oh, and all of this applies to
wasmtime servewith slight modifications as well.