Stream: general

Topic: Cargo component cli not working from wasmtime


view this post on Zulip Ari Seyhun (Nov 19 2022 at 09:04):

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

view this post on Zulip Alex Crichton (Nov 19 2022 at 15:15):

Currently wasmtime does not have component model support in the CLI, that'll come with WASI support soon

view this post on Zulip Christoph Brewing (Mar 27 2023 at 19:25):

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

view this post on Zulip Ramon Klass (Mar 27 2023 at 19:27):

this is a version conflict, you might need wasmtime from git for components

view this post on Zulip Alex Crichton (Mar 27 2023 at 20:04):

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

view this post on Zulip Christoph Brewing (Mar 28 2023 at 14:43):

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?

view this post on Zulip Alex Crichton (Mar 28 2023 at 14:53):

Currently it's "hopefully by the end of April", but nothing more concrete than that


Last updated: Nov 22 2024 at 16:03 UTC