Hacker News new | ask | show | jobs
by pancsta 97 days ago
How’s the size of WASM binaries in llgo? Because TinyGo is pure pain when you rely on stdlib. Also networking in WASI would be great. I will give it a spin, but leaving questions open here (no info on github).
1 comments

Good question. v1.0.0/v1.0.1 focused on being a drop-in Go replacement (full Go 1.20+ source compat, complete Go 1.27 syntax, cgo support), not WASM/WASI specifically.

WASI networking should work, and stdlib should be fully supported since that's our compat target. Binary size vs. stdlib coverage is likely a tradeoff, similar to TinyGo — haven't benchmarked it rigorously yet though.

Next release (~1–1.5 weeks) will bring full wasm/wasi support with a test report, including size numbers. Will post back here once it's out.

> WASI networking should work, and stdlib should be fully supported since that's our compat target.

Back in the day https://github.com/dispatchrun/net used to work for socket extensions in Big Go (but not TinyGo).

> v1.0.0/v1.0.1 focused on being a drop-in Go replacement (full Go 1.20+ source compat, complete Go 1.27 syntax, cgo support), not WASM/WASI specifically.

I will be honest that I'm more rooting for TamaGo getting WASM support (as it's a fork of gc), but llgo seems like a great middle ground. Also the lang interops may be useful to some when migrating codebases.