Stream: git-wasmtime

Topic: wasmtime / issue #10449 wasmtime::component::bindgen! mac...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2025 at 10:29):

pimeys added the bug label to Issue #10449.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2025 at 10:29):

pimeys opened issue #10449:

Test Case

In our repository, we have versioned wit shared by our host and guest code. One of the bindgen calls started generating invalid Rust code when we updated wasmtime from version 30 to version 31:

https://github.com/grafbase/grafbase/blob/renovate/wasmtime/crates/wasi-component-loader/src/extension/api/since_0_8_0/wit.rs

Then again the next version of this wit, which is just reorganized and a few things are changed in the method calls, this generates correct code:

https://github.com/grafbase/grafbase/blob/renovate/wasmtime/crates/wasi-component-loader/src/extension/api/since_0_9_0/wit.rs

Steps to Reproduce

Expected Results

Updating wasmtime should not lead to invalid Rust code.

Actual Results

If you expand the macro with an error, we see code like this generated:

pub type DirectiveSite = super::super::super::__with_name0::DirectiveSite<'a>;
pub type FieldDefinitionDirective = super::super::super::__with_name0::FieldDefinitionDirective<'a>;

The 0.9.0 wit macro does not generate code like this, nor does wasmtime 30 for the exact same macro call.

Versions and Environment

Wasmtime: 31.0.0
Operating system: Aurora Linux
Architecture: x86_64

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2025 at 10:38):

pimeys commented on issue #10449:

This looks like the source of the issue:

https://github.com/bytecodealliance/wasmtime/pull/10311

Ping @pchickey

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2025 at 18:13):

pchickey commented on issue #10449:

Thanks for the bug report - will look into this soon

view this post on Zulip Wasmtime GitHub notifications bot (Mar 21 2025 at 18:13):

pchickey assigned pchickey to issue #10449.


Last updated: Apr 17 2025 at 23:03 UTC