wabt
wabt copied to clipboard
wasm2wat: support component wasm
First of all, thank you for providing these great tools.
When I try to convert component wasm file to .wat, it keep says:
0000008: error: bad wasm file version: 0x1000d (expected 0x1)
To reproduce, simply follow the instruction in this doc to build the component and use wasm2wat to convert it to .wat
Version:
> cargo --version
cargo 1.77.0 (3fe68eabf 2024-02-29)
> cargo component --version
cargo-component-component 0.10.1 (wasi:ab5a448)
> wasm2wat --version
1.0.34
The component model is still a phase 1 proposal: https://github.com/WebAssembly/proposals
I believe it would require a fair amount of work to support it in wabt, but if you (or somebody else) would like to take a look at implementing it that would be most welcome.