Been awhile since I've done this, but historically I could grab an adapter module from this url https://github.com/bytecodealliance/preview2-prototyping/releases/tag/latest and then do wasm-tools component new ./path/to/module.wasm -o target.wasm --adapt wasi_snapshot_preview1.wasm
and it would generate a component wasm that I could later embed a wit into. Now I get the following error when I try to reproduce. Is this adapter module no longer up to date? Also maybe that work flow just isn't supported anymore? It was a couple months ago. Also I know the tooling has been changing quite a bit.
error: decoding custom section component-type:wasi-command
Caused by:
0: component-type version 2 does not match supported version 3
Oh that general workflow should still work, and the adapters have moved to Wasmtime's releases instead -- https://github.com/bytecodealliance/wasmtime/releases/tag/v10.0.1
Thanks!
Last updated: Dec 23 2024 at 12:05 UTC