First Commit
This commit is contained in:
15
wasm_browser.html
Normal file
15
wasm_browser.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<script type="module">
|
||||
|
||||
import { setupWebAssembly } from "./shared.js"
|
||||
|
||||
async function runWasm() {
|
||||
|
||||
const response = await fetch('./binaries/wasm_add.wasm');
|
||||
const wasmBuffer = await response.arrayBuffer();
|
||||
|
||||
setupWebAssembly( wasmBuffer );
|
||||
}
|
||||
|
||||
// Run on page load
|
||||
runWasm().catch(console.error);
|
||||
</script>
|
||||
Reference in New Issue
Block a user