Re:WASI Support in Go
by jbrandhorst on Wednesday September 13, 2023 @04:51PM
(#37501557)
There's no CGO involved when compiling to Wasm. The sometimes slow performance is due to the hoops the compiled code has to jump through to support the Go runtime and goroutine preemption on a single thread.
[ Parent
| on HN ]
Re:WASI Support in Go
by alecthomas on Wednesday September 13, 2023 @06:10PM
(#37502377)
I understand there's no CGo specifically, but I'm wondering if the Go runtime when running under WASM still has to manage switching out the goroutine stacks for "WASM stacks" when it's calling out through the WASM VM.
Edit: from this comment [1] it sounds like this is the case.