This is the only working example that i could find to show tinygo being used to compile golang to WASM for browsers
Its all here:
https://github.com/vugu/vugu/blob/master/devutil/tinygo-compiler.go
Which uses: https://github.com/vugu/docker-vugu-tinygo-dev
This is the example that shows it:
https://github.com/vugu-examples/tinygo
I plan to have a go at this approach, but wanted to let others know also as they may have their own thoughts on this.
It would be cool to get this working as the WASM code will go from 8 MB to 400 KB in general for basic projects.
Seems that Tinygo supports go modules, and the
go.mod
.I'm trying to build using Tinygo. But even after some changes on Gio source-code the compiler still running, without any error and any success. I wait some couple of hours to see what happens. I think it'll not work, but I'm really interesed on the tinygo support.
EDIT: It return "LLVM ERROR: out of memory", without any clue to fix.