Initial start for WASM

This commit is contained in:
Gregory Schier
2023-02-18 20:17:01 -08:00
parent ec6da90510
commit de8a36d04b
10 changed files with 956 additions and 13 deletions

16
src-tauri/src/runtime.js Normal file
View File

@@ -0,0 +1,16 @@
(function (globalThis) {
Deno.core.initializeAsyncOps();
function argsToMessage(...args) {
return args.map((arg) => JSON.stringify(arg)).join(' ');
}
globalThis.console = {
log: (...args) => {
Deno.core.print(`[log]: ${argsToMessage(...args)}\n`, false);
},
error: (...args) => {
Deno.core.print(`[err]: ${argsToMessage(...args)}\n`, true);
},
};
})(globalThis);