Closed glycerine closed 2 weeks ago
https://github.com/tinygo-org/tinygo/blob/release/targets/wasm_exec.js#L473
seems to hang forever so maybe that is the culprit?
Yes, if I just comment out that line (line 473 targets/wasm_exec.js), things seem to work fine; the wasm code returns to the javascript.
(Not to say there isn't the work Aykevl mentioned on slack to do to make sure everything else (other goroutines?) is finished properly first, just suggesting that removing that wait on a promise that will never resolve will certainly have to be a part of any fix).
filing an issue per Ayke's request from gopher slack:
Under tinygo 0.34.0 (and v0.33.0) my javascript can call the wasm but the wasm never returns back to the javascript after the await go.run(instance); like the big Go code does.
I tried calling an explicit os.Exit(0) too, but on execution I get:
process.exit is not a function
.Is there some trick to getting the tinygo wasm to finish?
I tested the simplest package main func main() { println("hiya") } program.
(to repro: https://gist.github.com/glycerine/50faaa852a8e41792ea7133732ec1655)