logoalt Hacker News

teki_one • today at 1:45 AM • 3 replies • view on HN

Why?


Replies

spankalee • today at 2:06 AM

Wasm is a first-class target for Rust, which produces faster and smaller Wasm binaries. My understanding is that you need to use TinyGo to reasonably target Wasm with Go.

Go having a garbage collector isn't necessarily bad, since Wasm has GC, but I think Go's GC can't easily use Wasm GC because Go has interior pointers.

➕ show 1 reply
0x696C6961 • today at 1:52 AM

I think the main advantage is size. Rust doesn't need to include the runtime.

cmrdporcupine • today at 1:54 AM

I'm assuming they mean because it doesn't need a garbage collector or much of a runtime at all. You can target direct to WASM and use I guess WASI, while Go brings with it a garbage collector and so on.