A Wasm to Go Translator
Get picks like this daily. Today's launch numbers, the top launches, AI and tech news, and a daily opportunity pick, straight to your inbox.
Want to reach these readers? Sponsor an issue.
I've spent the past couple of weeks building a Wasm-to-Go translator.It supports a subset of Wasm useful enough to translate SQLite into 600k LoC (~20 MiB) of Go code. It already passes all of my Go SQLite driver's tests across the 20 platforms I support.Performance compared to https://wazero.io/ is a bit of a mixed bag: code that frequently crosses the Go-Wasm boundary improves, but code that spends most of its time in "Wasm land" doesn't.There's probably room for improvement (I'd love to hear your ideas), but this is also a testament to how good the wazero AOT compiler actually is.You can get a feel for the generated code by looking into https://github.com/ncruces/wasm2go/tree/main/testdataI should eventually spend some time ensuring the translator passes the spectest, though I suspect that'll be far less fun than building the translator itself was.
HN · launched Feb 26, 2026 · 7 upvotes (top 62%) · 2 views
Niche: programming language compilers · 77 launches, 2 in the last 7 days ▼ -60% · Explore this niche →
Category and tags
- Horizontal
- Dev tools
- Developer
- Not AI
- Hobby / open-source project
Visit website ↗ Source listing ↗
More like this: all 77 launches in programming language compilers →
Could you build this?
No Transpiling WebAssembly bytecode into idiomatic, performant Go code capable of compiling 600k LoC of C/SQLite requires compiler engineering and virtual machine architecture expertise.
What it would actually take: Requires building a full Wasm binary decoder, type checker, control flow restructuring engine (converting Wasm structured control flow / irreducible CFGs into Go loops and gotos), and emulating linear memory/pointer arithmetic in Go. This is low-level compiler research requiring deep expertise in Wasm specs and Go compiler internals.
Discussion
1 comment analyzed.
Competitors mentioned: wazero
Concerns raised: Generated code is slow to compile and unreadable
Feature requests: Performance optimization for little endian platforms using unsafe.Pointer
Competitors
Other products that read as similar to this one : 106 launches clear the similarity bar, closest 8 shown.
Attention rank: #67 of 107 (itself plus its competitors, highest first, normalized so YC and Product Hunt are compared fairly).
Launched 117 days after the earliest competitor.
- I created a library for correctly using SQLite in Go programs · hn · 2026-11-11 · 26 upvotes · similarity 0.51
- Llm.sql · hn · 2026-04-24 · 8 upvotes · similarity 0.51
- Musql, JIT-compiled SQL, up to 300x faster than SQLite, 1000x vs. Turso · hn · 2026-10-07 · 11 upvotes · similarity 0.49
- I made a Clojure-like language in Go, boots in 7ms · hn · 2026-05-09 · 292 upvotes · similarity 0.45
- twelve-dollar-server-challenge · github · 2026-10-03 · 37 upvotes · similarity 0.42
- Distilled 0.6B text-to-SQL model · hn · 2026-01-21 · 5 upvotes · similarity 0.39
- NetWasm · hn · 2026-09-29 · 5 upvotes · similarity 0.39
- I fine-tuned Qwen 3.5 (0.8B–4B) on a Mac for text-to-SQL · hn · 2026-03-05 · 7 upvotes · similarity 0.39
The niche, labels, vibe code rating and competitor comparison on this page are analysis by Nicheloom. If you use them, please credit nicheloom.com. How you may use our data.