pimeys added the bug label to Issue #10449.
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:
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:
Steps to Reproduce
- Clone repo https://github.com/grafbase/grafbase
- 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
pimeys commented on issue #10449:
This looks like the source of the issue:
https://github.com/bytecodealliance/wasmtime/pull/10311
Ping @pchickey
pchickey commented on issue #10449:
Thanks for the bug report - will look into this soon
pchickey assigned pchickey to issue #10449.
Last updated: Apr 17 2025 at 23:03 UTC