samedi 24 octobre 2020

Import #1 module="env" function="table" error: table import requires a WebAssembly.Table

What could possibly cause the following error in my devtools?

LinkError: WebAssembly.instantiate(): Import #1 module="env" function="table" error: table import requires a WebAssembly.Table

I am compiling my C++ code with:

$ emcc -std=c++11 -s MODULARIZE=1 -o wasm_interface.js $(SRCS) -s ASSERTIONS=1

I am then consuming wasm_interface.js in javascript by:

import * as createModule from 'path/to/wasm_interface.js';

const myModule = {locateFile: () => 'path/to/wasm_interface.wasm'};
createModule(myModule);

Aucun commentaire:

Enregistrer un commentaire