by Abishek_Muthian · 4y ago · 0 comments
Is this just a consequence of using Go for WASM(i.e. lack of WASM threads), What are people who built LibreOffice in WASM or Doom3 using? Can Go-level concurrency be achieved with WASM threads when programmed with other languages?
Another thing you can try is TinyGo, whch uses Asyncify (a general wasm transformation to allow blocking) for goroutines,
https://twitter.com/TinyGolang/status/1461364896197578759
Doom3 uses Asyncify in some parts of the event loop, for similar reasons (blocking code). I'm not sure if LibreOffice does as well, but it might.
The Go library I need(ebiten) isn't compatible with TinyGo, I did try it for the reason you mentioned and to reduce size.
> Doom3 uses Asyncify in some parts of the event loop, for similar reasons (blocking code). I'm not sure if LibreOffice does as well, but it might.
Thanks! That's what I wanted to know, So it's certainly possible to write asynchronous code using C++ and Rust.
It does have some overhead atm, which a new spec (stack switching) will remove eventually.
There are others who have complained the same on SO.