1
0
mirror of https://github.com/fluencelabs/assemblyscript synced 2025-04-28 16:32:15 +00:00

7 lines
267 B
JavaScript
Raw Normal View History

const fs = require("fs");
const compiled = new WebAssembly.Module(fs.readFileSync(__dirname + "/build/optimized.wasm"));
const imports = { JSMath: Math };
Object.defineProperty(module, "exports", {
get: () => new WebAssembly.Instance(compiled, imports).exports
});