You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Compile the crate crates/wasi-component-loader with cargo build, it should work.
Change the branch to renovate/wasmtime which updates wasmtime from 30 to 31
See the bindgen macro giving an error: use of undeclared lifetime name 'a
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
The text was updated successfully, but these errors were encountered:
pimeys
added
the
bug
Incorrect behavior in the current implementation that needs fixing
label
Mar 21, 2025
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:
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
The text was updated successfully, but these errors were encountered: