jrandolf opened PR #14876 from jrandolf:cli-labelled-wasi-errors to bytecodealliance:main:
The CLI doesn't bind labelled WASI imports or exports, which #14859 says is by design. The errors for them were misleading, though. This makes them say what's going on.
Case Before After import env2: wasi:cli/environment@0.3.0;underrunorserve"component imports instance env2, but a matching implementation was not found in the linker""component imports wasi:cli/environment@0.3.0under the nameenv2, but the wasmtime CLI only provides WASI interfaces under their own names; labelled WASI imports aren't supported"export r: wasi:cli/run@0.2.0;underrun"no exported instance named wasi:cli/run@0.2.12""component exports wasi:cli/run@0.2.0under the namer, but the wasmtime CLI only uses exports named after the interface itself; labelled WASI exports aren't supported"export h: wasi:http/handler@0.3.0;underserve"no exported instance named wasi:http/incoming-handler@0.2.12"the same, for h
docs/cli-options.mdnow says that labelled WASI imports and exports aren't supported, and points embedders atadd_named_to_linker.The second commit is for embedders: when a labelled import is missing from a
Linker, theLinker's own error now ends with "(it implementsa:b/kv, but imports are matched by their own name)", since the definition is often there under the interface's name.Closes #14859
:cross_mark: jrandolf closed without merge PR #14876.
Last updated: Oct 31 2026 at 23:03 UTC