Fix and also unify ugc example, see #101

This commit is contained in:
dcodeIO
2018-05-09 15:22:38 +02:00
parent 1f3bb61fae
commit dae9880428
5 changed files with 970 additions and 1072 deletions

View File

@ -2,7 +2,11 @@ var fs = require("fs");
// NOTE that this doesn't do anything useful, yet
var ugc = new WebAssembly.Instance(new WebAssembly.Module(fs.readFileSync(__dirname + "/../ugc.untouched.wasm"))).exports;
var ugc = new WebAssembly.Instance(new WebAssembly.Module(fs.readFileSync(__dirname + "/../build/untouched.wasm")), {
env: { abort: function(msg, file, line, column) {
console.log("abort called at " + line + ":" + column);
} }
}).exports;
function mem(memory, offset, count) {
if (!offset) offset = 0;