Running Golang on the Browser with WebAssembly and TinyGo
marianogappa.github.io
Running Golang on the Browser with WebAssembly and TinyGo
1–8 of 8 posts
Re: Running Golang on the Browser with WebAssembly and TinyGo
#2Re: Running Golang on the Browser with WebAssembly and TinyGo
#3Re: Running Golang on the Browser with WebAssembly and TinyGo
#4I assume there's no GC since WASM doesn't (yet) support that, and this isn't a VM or interpreter. Is that correct?
The post is using TinyGo, which explicitly mentions it uses a GC and doesn't exclude the Wasm target (which otherwise is sometimes mentioned if there's something it does differently): https://tinygo.org/lang-support/#garbage-collection
Please correct me if I'm wrong!
Re: Running Golang on the Browser with WebAssembly and TinyGo
#5I assume there's no GC since WASM doesn't (yet) support that, and this isn't a VM or interpreter. Is that correct?
Any language targeting current WASM just brings their own GC implementation for the ride as well.
Re: Running Golang on the Browser with WebAssembly and TinyGo
#6Re: Running Golang on the Browser with WebAssembly and TinyGo
#7I assume there's no GC since WASM doesn't (yet) support that, and this isn't a VM or interpreter. Is that correct?
My Intel CPU also doesn't have a GC. Any language targeting current WASM just brings their own GC implementation for the ride as well.
Re: Running Golang on the Browser with WebAssembly and TinyGo
#8I assume there's no GC since WASM doesn't (yet) support that, and this isn't a VM or interpreter. Is that correct?
Wasm doesn't have its own GC, but just like Go binaries for other compilation targets include a runtime with GC, the Wasm binary includes that as well I think. That's regarding Go in general. The post is using TinyGo, which explicitly mentions it uses a GC and doesn't exclude the Wasm target (which otherwise is sometimes mentioned if there's something it does differently): https://tinygo.org/lang-support/#garbage-col…
It can be turned off, but by default it's included.
From rough memory, it's based upon or uses the same principles as the MicroPython one. Akye (primary TinyGo author) was experienced with MicroPython before starting the TinyGo project.
Disclaimer - I've made very minor contributions to the TinyGo project, but haven't really touched it in a few months.