diff options
author | davidovski <david@davidovski.xyz> | 2023-10-17 03:26:58 +0100 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2023-10-17 03:26:58 +0100 |
commit | 59a76335613b836312f03a539e61c00a09b0962d (patch) | |
tree | be44403f7ab1d14b6dbd9efa19c0c1844f5350de /index.html |
initial commit
Diffstat (limited to 'index.html')
-rw-r--r-- | index.html | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/index.html b/index.html new file mode 100644 index 0000000..cdc36b5 --- /dev/null +++ b/index.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<script src="wasm_exec.js"></script> +<script> +// Polyfill +if (!WebAssembly.instantiateStreaming) { + WebAssembly.instantiateStreaming = async (resp, importObject) => { + const source = await (await resp).arrayBuffer(); + return await WebAssembly.instantiate(source, importObject); + }; +} + +const go = new Go(); +WebAssembly.instantiateStreaming(fetch("pengui.wasm"), go.importObject).then(result => { + go.run(result.instance); +}); +</script> |