You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
556 B
HTML

<!doctype html>
<html>
<body>
<script type="text/javascript">
WebAssembly.instantiateStreaming(fetch("./output.wasm"), {
wasi_snapshot_preview1: {
proc_exit: (i) => {throw new Error('err ' + i)},
fd_write: (a, b, c, d) => console.log('writing something')
}
})
.then(({instance}) => {
window.runWasm = () => {
debugger
instance.exports._start()
}
})
</script>
<button onClick="javascript:runWasm()">run wasm</button>
</body>
</html>