Stream: git-wasmtime

Topic: wasmtime / issue #14855 bindgen! fails when a world impor...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 19 2026 at 20:46):

jrandolf opened issue #14855:

bindgen! fails to compile a world that imports an interface both directly and under a label:

world w {
  import store;
  import a: store;
}
error[E0428]: the name `store` is defined multiple times

It fails in either order, when the direct import is implicit through a use, and for realistic WASI worlds like include wasi:cli/imports@0.3.0; import a: wasi:cli/environment@0.3.0;. Worlds with only labelled imports compile fine. The WIT is valid (wit-component has an encoding test for this exact shape).

The labelled branch in crates/wit-bindgen/src/lib.rs (~518-535) generates the interface module at the interface's own path, and the plain branch doesn't check whether that already happened, so the module is generated twice.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 19 2026 at 20:57):

alexcrichton added the wasm-proposal:component-model-implements label to Issue #14855.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2026 at 14:57):

alexcrichton closed issue #14855:

bindgen! fails to compile a world that imports an interface both directly and under a label:

world w {
  import store;
  import a: store;
}
error[E0428]: the name `store` is defined multiple times

It fails in either order, when the direct import is implicit through a use, and for realistic WASI worlds like include wasi:cli/imports@0.3.0; import a: wasi:cli/environment@0.3.0;. Worlds with only labelled imports compile fine. The WIT is valid (wit-component has an encoding test for this exact shape).

The labelled branch in crates/wit-bindgen/src/lib.rs (~518-535) generates the interface module at the interface's own path, and the plain branch doesn't check whether that already happened, so the module is generated twice.


Last updated: Oct 31 2026 at 23:03 UTC