After having upgraded to wit-bindgen = "0.7.0"
for guest generation, the Python bindings are not generated anymore:
$python -m wasmtime.bindgen ./component.wasm --out-dir decoder/
RuntimeError: failed to extract interface information from component
Caused by:
unknown component version: 0xd (at offset 0x0)
Python uses wasmtime-9.0.0
.
The component is working as expected when bound to Rust.
Can anyone confirm that generating Python bindings produces an error? Is there a workaround?
I think the new wit-bindgen expects the wasmtime 10 wit format, wit has changed quite a bit unfortunately, a version of componentize-py that supports wasmtime 10 is next on the list as far as I understand
but in general, that error (unknown component version) means your toolchain has diverged and some expect an older format of components while some expect a newer one
Ramon Klass said:
I think the new wit-bindgen expects the wasmtime 10 wit format, wit has changed quite a bit unfortunately, a version of componentize-py that supports wasmtime 10 is next on the list as far as I understand
I think you meant wasmtime-py
based on the error Christoph shared. But yeah, componentize-py
needs an update, too. The snapshot
branch of the componentize-py
repo is compatible with the latest component format, but it also relies on toolchain patches to support shared-everything linking, so it's not ready for general use yet.
thank you for elaborating, and yes I need to familiarize myself more with all the parts involved in the wasi toolchain, some are "something something wasmtime" to me still
you aren't the only one! Because there's a lot of movement at the moment prepping for the changes coming a lot of people are "something version 3.1 something version 8.4 something version 23 wasmtime-klsk392" :-) moving targets are hard.....
(probably last) update: meanwhile wasmtime-py has been updated to match wasmtime 10.0.0
. With this version, the bindings are generated flawlessly.
Christoph Brewing has marked this topic as resolved.
Last updated: Nov 22 2024 at 16:03 UTC