WebAssembly / WebAssembly/wabt

wasm2wat: support component wasm

Open
#2,405 4 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
8.1k
Forks
827
Avg merge
4d 6h
Merged PRs (30d)
18

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the wasm2wat entry point and reproduce the failure using a component wasm built by following the linked Rust component-model instructions. Compare the reported component version error with the tool's expected input, then verify that wasm2wat accepts the component file and produces .wat output.

Written by the indexing model from the issue text.

Assessment

Tech stack
wasm
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.