Hi all :wave: I'm playing with cargo-component for the first time, and I've created something with cargo component new
and then cargo component build
. I want to inspect the resulting wasm file, so I tried wasm-tools print
on it, but I got this error:
Error: unexpected end-of-file (at offset 0x1e099d)
is this a known issue?
cargo-component
is slightly out of date with the binary format (wasm-tools was updated late last week), I'm in the process of updating it now
if you use wasm-tools
from just before this PR was merged, it should hopefully work around the issue.
i'm waiting on this other PR to merge and then I'll update cargo-component
so that it works with the latest wasm-tools
Thank you very much, Peter. I'll keep an eye on those PRs, and for your upcoming one that updates cargo-component
Hi @Andrew Chin . I've put up https://github.com/bytecodealliance/cargo-component/pull/41 which should update it to the latest component model spec (and thus work with the latest wasm-tools).
Hi @Andrew Chin. I just wanted to follow up and say the PR was merged, so if you update your cargo-component
(note that there is a brekaing change with wit file contents: they need to now be wrapped in an interface <name> { ... }
declaration), it should now work with current wasm-tools. Thanks for your patience!
Last updated: Dec 23 2024 at 12:05 UTC