wabt icon indicating copy to clipboard operation
wabt copied to clipboard

error initializing module: invalid import "a.a"

Open TongMeng-AI opened this issue 1 year ago • 1 comments

TongMeng-AI avatar Mar 18 '24 06:03 TongMeng-AI

It looks like you are perhaps trying to run a wasm module generated by emscripten with optimizations enabled.

emsripten will minify the names of the import/export between JS and Wasm, assuming that only the generated JS file will ever be loading the wasm file.

If you want to try to load the wasm module yourself without the generated JS then you would want build directly to wasm via -o .wasm (or using -sSTANDALONE_WASM). However, running and emscripten-generated wasm module in wabt is unlikely to work since emscripten-generated modules tend to have a other imports that wabt doesn't provide.

sbc100 avatar Mar 18 '24 14:03 sbc100