Stream: git-wasmtime

Topic: wasmtime / issue #14090 `wasmtime::component::bindgen` `n...


view this post on Zulip Wasmtime GitHub notifications bot (Aug 07 2026 at 02:06):

itowlson opened issue #14090:

When I try to use wasmtime::component::bindgen's new named_imports option on an interface with a hyphen in it, I get an error.

A repro case is here: https://github.com/itowlson/implements-hyphen-test

error: expected one of `;` or `{`, found `-`
 --> src/main.rs:2:5
  |
2 | /     wasmtime::component::bindgen!({
3 | |         path: "./wit",
4 | |         world: "w",
5 | |         named_imports: {
6 | |             "impo:impo/my-itf@1.2.3": String,
7 | |         },
8 | |     });
  | |______^ expected one of `;` or `{`

Tested with Cargo 1.97.1 and Cargo 1.99.0-nightly.

I am not sure if I am doing something wrong but it seems like this could be an issue with named_imports bindgen?

(I tried to see the expansion of the macro so I could share that, but I wasn't able to get it, sorry.)

view this post on Zulip Wasmtime GitHub notifications bot (Aug 10 2026 at 17:49):

alexcrichton closed issue #14090:

When I try to use wasmtime::component::bindgen's new named_imports option on an interface with a hyphen in it, I get an error.

A repro case is here: https://github.com/itowlson/implements-hyphen-test

error: expected one of `;` or `{`, found `-`
 --> src/main.rs:2:5
  |
2 | /     wasmtime::component::bindgen!({
3 | |         path: "./wit",
4 | |         world: "w",
5 | |         named_imports: {
6 | |             "impo:impo/my-itf@1.2.3": String,
7 | |         },
8 | |     });
  | |______^ expected one of `;` or `{`

Tested with Cargo 1.97.1 and Cargo 1.99.0-nightly.

I am not sure if I am doing something wrong but it seems like this could be an issue with named_imports bindgen?

(I tried to see the expansion of the macro so I could share that, but I wasn't able to get it, sorry.)


Last updated: Aug 30 2026 at 10:08 UTC