Stream: general

Topic: Wasm tools component new fails


view this post on Zulip Ari Seyhun (Jan 16 2023 at 08:04):

After writing a wasm component in Rust, and building to wasm32-wasi, I am trying to convert it to a wasm component with wasm-tools component new using the https://github.com/bytecodealliance/preview2-prototyping adapter, but when executing the command I get this error:

Error: decoding custom section component-type:aggregate

Caused by:
unsupported component version: 0xa (at offset 0x0)

This only happened after updating all my dependencies. Any ideas?

Polyfill adapter for preview1-using wasm modules to call preview2 functions. - GitHub - bytecodealliance/preview2-prototyping: Polyfill adapter for preview1-using wasm modules to call preview2 func...

view this post on Zulip Alex Crichton (Jan 17 2023 at 02:00):

The binary format is changing over time for the component model and not all tools are always kept up to date with main of all other tools. What you're seeing here is the main branch of wasm-tools is ahead of what wasmtime and other tooling supports, so binaries produced by wasm-tools main branch can't be consumed by runtimes yet.

view this post on Zulip Mossaka (Joe) (Jan 17 2023 at 17:54):

Hey there, I have a working demo that uses both wasm-tools and prevew2-prototyping and I am trying my best to keey a compatiable set of dependencies. You can see the wasm-tools commit and preview2-prototyping wasm binary in the repo. https://github.com/Mossaka/keyvalue-component-model-demo

A demo repo that shows how to use the latest component model feature in wasmtime to implement a key-value capability defined in a WIT file. - GitHub - Mossaka/keyvalue-component-model-demo: A demo ...

Last updated: Nov 22 2024 at 17:03 UTC