3 ms·
Any Go WASM solution will come with big performance costs and complexity that are worth considering: 1. Since WASM doesn't yet expose a feature to share GC wit
by cnity 4y ago
Any Go WASM solution will come with big performance costs and complexity that are worth considering:
1. Since WASM doesn't yet expose a feature to share GC with the host, the GC functionality with necessarily be bundled with your outputted code, making your WASM size larger than ideal.
2. All calls from WASM have to go through a JS layer in order to interact with the Web APIs anyway, so now you actually have _two_ GCs to run.
3. The developer experience is going to be poor unless you write a shit ton of wrappers for the existing DOM API.
I say the above not to dissuade you, I find WASM an attractive value proposition and use WASM in all sorts of ways in personal projects. Good luck
- marcus_holmes 4y agoI'm not bothered about GC's - the size is a problem, but I've never had to worry about GC performance issues yet. Everything else is spot on, that's the pain!
- cnity 4y agoYou probably know about this, but it might be worth trying TinyGo[0] for WASM, given that WASM is basically an embedded environment. 0: https://tinygo.org/ https://tinygo.org/