watgo: a pure-Go WebAssembly toolkit arrives

What happened
It has been reported that Eli Bendersky announced the general availability of watgo, a WebAssembly toolkit written entirely in Go. Think wabt or wasm-tools, but native to the Go ecosystem and zero-dependency. Why does that matter? Because Go developers tired of wrapping C or Rust binaries now have a first-class option for parsing WAT, validating modules, and emitting or reading WASM binaries — all within the language they already use.
CLI and API
watgo ships with both a CLI (installable via go install github.com/eliben/watgo/cmd/watgo@latest) and a Go API centered on wasmir, a semantic representation of a WASM module that you can inspect and manipulate. The toolkit offers parse, validate, encode and decode stages: WAT → wasmir → WASM and back. Small but important detail: the project flattens WAT syntactic sugar into canonical wasmir form (folded instructions become linear, names resolve to indices), and the textformat parser that preserves WAT ASTs is intentionally kept internal for now — public exposure might come later if there's demand.
Testing and why it matters
It has been reported that Bendersky leaned heavily on the official WebAssembly test suite for end-to-end verification, building a harness to run the .wast cases through watgo — a pragmatic way to catch subtle validation and encoding edge cases. The upshot: a Go-native toolchain component that aims to be compatible with existing wasm-tools workflows and sample projects. For Go programmers who like their toolchain in one language, this fills a real gap. Who knew the party was missing a Go DJ?
Sources: eli.thegreenplace.net, Lobsters
Comments