mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-26 07:22:21 +00:00
9 lines
316 B
JavaScript
9 lines
316 B
JavaScript
|
const fs = require("fs");
|
||
|
const compiled = new WebAssembly.Module(fs.readFileSync(__dirname + "/build/optimized.wasm"));
|
||
|
const imports = {
|
||
|
env: { abort: function() { throw Error("abort called"); } }
|
||
|
};
|
||
|
Object.defineProperty(module, "exports", {
|
||
|
get: () => new WebAssembly.Instance(compiled, imports).exports
|
||
|
});
|