Hi,
I'm new to webassemblyjs and I'm trying to use wasm-parser to parse and edit wasm binary code in a web application (using esbuild to bundle for web).
I compiled some rust code to wasm using wasm-bindgen, then in my js I tried to parse the binary wasm:
binary => {
const decoderOpts = {dump: true};
const ast = decode(binary, decoderOpts);
}
However, I get a parsing error: Error: Unexpected instruction: 0xfc08 when I run this. I opened my wasm file in a webassembly text viewer and saw that this was a memory.init 0 instruction (https://webassembly.github.io/spec/core/syntax/instructions.html#syntax-instr-memory). Is this instruction just not supported by webassemblyjs or am I missing something?
Version: @webassemblyjs/wasm-parser@1.14.1
Hi,
I'm new to webassemblyjs and I'm trying to use
wasm-parserto parse and edit wasm binary code in a web application (using esbuild to bundle for web).I compiled some rust code to wasm using wasm-bindgen, then in my js I tried to parse the binary wasm:
However, I get a parsing error:
Error: Unexpected instruction: 0xfc08when I run this. I opened my wasm file in a webassembly text viewer and saw that this was amemory.init 0instruction (https://webassembly.github.io/spec/core/syntax/instructions.html#syntax-instr-memory). Is this instruction just not supported by webassemblyjs or am I missing something?Version:
@webassemblyjs/wasm-parser@1.14.1