I am using the latest version (main) of witx-bindgen and running into the error "canonical_abi" has not been defined
. I have a function defined on the host which returns a reference. On the wasm side I am simply echoing the resource back to the host.
Do I need to link something? If I get rid of the resource stuff and just use s32 instead everything works.
The witx I am using for the host api is:
resource Row
next: function() -> Row
emit: function(r: Row)
the host defines Row as simply a simple struct for now
and I am using rust
Hm that sounds like a bug in the generated code, can you open an issue for this?
sure thing
sounds like this PR might be relevant? https://github.com/WebAssembly/interface-types/pull/132
https://github.com/bytecodealliance/witx-bindgen/issues/76
@Alex Crichton any ideas on the issue? It's a bit difficult to hack around
oops meant to dig in this morning but forgot, let me take a look now
thanks!
oh so the bad error message is because of wasm_module_linking(true)
that's a bug in wasmtime
otherwise I see the issue, should be an easy fix on witx-bindgen's part
ok should be fixed by <https://github.com/bytecodealliance/witx-bindgen/pull/79>
and I've submitted https://github.com/bytecodealliance/wasmtime/issues/3388 for the bad error message
woohoo - thanks for the fast turn around. I'll test your PR against my diff
works great - thanks for the quick turnaround
Carl Sverre has marked this topic as resolved.
Last updated: Dec 23 2024 at 13:07 UTC