local html file for debugging
parent
93c790a4ef
commit
299190d76f
@ -1,2 +1,2 @@
|
||||
./intermediate.wat
|
||||
./output.wasmu
|
||||
intermediate.wat
|
||||
output.wasm
|
||||
|
@ -0,0 +1,20 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
WebAssembly.instantiateStreaming(fetch("./output.wasm"), {
|
||||
wasi_unstable: {
|
||||
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>
|
Loading…
Reference in New Issue