Namespaced imports

This commit is contained in:
dcodeIO
2017-12-27 22:38:32 +01:00
parent eccac129ad
commit 7795d48d98
13 changed files with 157 additions and 74 deletions

View File

@ -61,7 +61,12 @@ glob.sync(filter, { cwd: __dirname + "/compiler" }).forEach(filename => {
var wasmModule = new WebAssembly.Module(module.toBinary());
var wasmInstance = new WebAssembly.Instance(wasmModule, {
env: {
external: function() {}
externalFunc: function() {},
externalConst: 1
},
external: {
externalFunc: function() {},
externalConst: 2
}
});
console.log(chalk.default.green("instantiate OK"));