on(_initialize, 'instance.exports._initialize'); _initialize(); } } } module.exports = { WASI }; function wasiReturnOnProcExit(rval) { // If __wasi_proc_exit() does not terminate the process, an assertion is // triggered in the wasm runtime. Node can sidestep the assertion and return // an exit code by recording the exit code, and throwing a JavaScript // exception that WebAssembly cannot catch. this[kExitCode] = rval; throw kExitCode; }