WebAssembly / WebAssembly/wabt

"invalid linking metadata version: 3" when running against Rust-generated WASM

Open
#842 11 comments 0 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

When running wasm2wat on Rust-generated WASM, I get an error:

wasm2wat --fold-exprs --generate-names --inline-exports --ignore-custom-section-errors --no-check -o /tmp/out.wat target/wasm32-unknown-unknown/release/playground.wasm.gc
002e818: error: invalid linking metadata version: 3

playground.wasm.zip

The --ignore-custom-section-errors flag doesn't seem to take effect; perhaps I'm doing something wrong?

I'm using:

  • rustc 1.27.0-nightly (f0fdaba04 2018-05-15)
  • Commit dd7663d78bf483308cd8d70d114748321f2cd61f

(moved from comments on #841)

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 by reproducing the failure with wasm2wat and the supplied playground.wasm.zip using the command in the report. Trace how wasm2wat handles the linking metadata section and why version 3 is rejected despite --ignore-custom-section-errors. Done means the reported Rust-generated WASM is processed as requested, with coverage for the relevant error or flag behavior.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.