Stream: general

Topic: wasm-tools print


view this post on Zulip Andrew Chin (Nov 23 2022 at 02:31):

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?

view this post on Zulip Peter Huene (Nov 23 2022 at 03:14):

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

view this post on Zulip Peter Huene (Nov 23 2022 at 03:15):

if you use wasm-tools from just before this PR was merged, it should hopefully work around the issue.

This PR implements the latest changes to the component model spec: Adds a URL field to imports and exports. Adds validation of the URL field. Adds validation of various "names" such that they are ...

view this post on Zulip Peter Huene (Nov 23 2022 at 03:16):

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

This PR refactors wit-parser such that there is now a top-level Document parser that can represent multiple worlds and interfaces in a single wit document. The previous internal Document type which...

view this post on Zulip Andrew Chin (Nov 23 2022 at 03:23):

Thank you very much, Peter. I'll keep an eye on those PRs, and for your upcoming one that updates cargo-component

view this post on Zulip Peter Huene (Nov 29 2022 at 01:41):

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).

This PR updates cargo-component's dependencies to latest. It includes changes to wit-component to support the current binary format of the component model. As a result of changes to wit-parser, int...

view this post on Zulip Peter Huene (Nov 30 2022 at 22:32):

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