Soni L.
Soni L.
do you need the IR? why not use binary reader directly?
yeah, that happens when using the IR. why not use `ReadBinary` instead of `ReadBinaryIr`? that one gives you a stream of instructions you can modify on the fly.
that's what we figured you were doing, and we would still recommend using ReadBinary instead. it's a streaming parser so you only need enough RAM for roughly two copies of...
the webassembly binary format is mostly designed for single-pass processing, this is why imports come before anything else. so the first thing that would be decoded would be the number...
oh wait, we don't really have a streaming module writer. hmm... (is it needed? how hard would it be to write out a module as it's being read? maybe this...
we believe skip_function_bodies was never designed for use with ReadBinaryIr. it should probably have rejected it. (in fact, it seems to only be used by objdump.)
we think we can fix this...
it looks like you're trying to run an emscripten module. wabt is only a wasm engine, not a full wasm runtime, and definitely not an emscripten runtime. however, if you...
oh, in that case, you may be missing wasi-libc?
it's trying to import stuff that's not provided by wasi. check wasm-objdump.