Closed smndtrl closed 1 week ago
Off the top of my head I don't know what could be causing this, do you have a repository/example/reproduction that could be poked around?
@alexcrichton I've run into this and made a repro here. Using the build-plug
script to make the component brings about the issue at hand.
The most interesting thing about the repo is that I'm trying to house the bindings generated by the macro in an sdk
crate that the actual component crates import and use. This includes WIT import and exports.
I notice that the wasi-rs
repo seems to have statically expanded the macro output, is that limitation driven?
And yeah, I'm on wasm-tools 1.215.0.
Thanks @dman-os for the reproduction! That should be fixed in https://github.com/bytecodealliance/wit-bindgen/pull/1029. In the meantime you can additionally fix it by specifying type_section_suffix: "suffix",
around here. The problem is you have two worlds named imports
and the suffix is needed to disambiguate. The suffix will no longer be required after #1029
After upgrading
wit-bindgen
, the following error occurred duringcargo component build
while
cargo build --target wasm32-wasi
works perfectly.cargo expand
for both versions results in thisAny ideas? Could it be related to any changes in
0.26
that are not compatible withcargo-components
0.25
?