I'm trying to build some Rust guest code which imports .wit with the cargo component build
command, but when I try to import it with wasmtime in some host code, I get an error:
failed to parse WebAssembly module
attempted to parse a wasm module with a component parser
Currently wasmtime does not have component model support in the CLI, that'll come with WASI support soon
Do I understand correctly that currently that I cannot execute a component with wasmtime cli? I crafted a component as well, using wasm-tools component new
. It yields the following error:
Error: failed to run main module `composed.wasm`
Caused by:
0: failed to parse WebAssembly module
1: Invalid input WebAssembly code at offset 4: Bad version number
this is a version conflict, you might need wasmtime from git for components
Currently though, that's correct. The wasmtime
CLI doesn't support components just yet. That'll get implemented when the preview2 implementation is merged into Wasmtime's repository
Thank you, both of you. I will check the version issue and wait impatiently for the merge. Is there a rough schedule such that I know when to look out for the merge?
Currently it's "hopefully by the end of April", but nothing more concrete than that
Last updated: Nov 22 2024 at 16:03 UTC