3 ms·
I've been building wasm powered apps (compiled from Go) for almost a year. Main issues: - the size of your build: you need to check what packages you import a
by themihai 5y ago
I've been building wasm powered apps (compiled from Go) for almost a year.
Main issues:
- the size of your build: you need to check what packages you import and possible trim them down
- resource usage and performance(due the lack of DOM).
- bugs/implementation: the browser may stop working/freeze after a while. There were some issues with the scheduler, I'm not sure if it's still the case. If you develop an UI for an embedded device this is a big issue.
It may work for Desktop apps (electron based) or some enterprise apps so it has its niche but you definitely can "feel" the difference between a wasm implementation and a pure JS implementation. As a client you will prefer the JS version. As a developer you will love the Go version
All that being said it's great to be able to use Go in browser and as the devices are getting faster along with the network I guess it will work just fine once 5G becomes mainstream.
Hint: If you process HTML, always use the DOM/JS interface. Any processing of HTML (i.e. via x/net/html) in Go will make your app VERY slow.