I haven’t seen many posts about the new WebAssembly support in Go 1.11, so I decided to try it out and see what it could do. I’ve been having some fun with it, and thought I would share some code to encourage other Go programmers to get started with WebAssembly.
Go is popular for server-side web programming, and now it can also be used in the client.
Here is a little Go WebAssembly app I created: http://jayts.com/vp/
And the code is here: https://github.com/Yaoir/VideoPoker-Go-WebAssembly
README has directions for playing the game. The HTML, CSS, and Go code are commented so you can understand how WebAssembly works. If you want to try making your own WebAssembly app, it can act as a starting point. I also have a simpler example of WebAssembly in Go, which may be a better place to start learning: https://github.com/Yaoir/ClockExample-Go-WebAssembly
I’d like to hear from Mac and iOS users to see if the video poker app works well on Apple products, using Safari, Firefox, Chrome, and Opera. The only problem I’ve seen so far is when using Firefox on an old Android 4.2 tablet. Overall, WebAssembly support seems to work well.