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?
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.
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
Last updated: Dec 23 2024 at 12:05 UTC