nowfound

Work · November 1, 2022

Wrote a tiny WebAssembly (wat2wasm) compiler in Go

As a personal project I wrote a really tiny Wat 2 Wasm compiler in Go. Mainly for demonstrative and educational purposes. It was tough: I didn't know anything about WebAssembly internals and I'm a newbie with Go... so I tried to document it as much as I could for anyone that would like to approach the quest in the future! It misses a lot of features (that will be gradually implemented). Any feedback is welcomed!! Demo: https://luna-demo.vercel.app

Wrote a tiny WebAssembly (wat2wasm) compiler in Go launched on November 1, 2022 with 75 votes, #707 of 3,471 launches that month and more than 90% of that year's launches. The site was still online in September 2026, 3 years on.

Visit github.com ↗Alternativestop 20% of November 2022

In plain words

This is a minimal WebAssembly compiler written in Go that converts WebAssembly text format (WAT) to binary format (WASM). Built as an educational project, it's designed to help developers understand WebAssembly internals and Go programming through heavily documented code. The compiler currently lacks many advanced features but aims to gradually expand functionality. It's intended for anyone interested in learning how WebAssembly compilation works rather than production use.

written from the facts on this page · September 2026

From the sources

🌙 A really tiny WebAssembly compiler for demonstration and educational purposes. Written in Go and built as one of my quests to conquer the WebAssembly dungeon - thomscoder/luna

Does a similar job

all alternatives →
  • TinyGo – LLVM-based Go compiler for microcontrollers2018 · github.com · ▲177

    Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM. - tinygo-org/tinygo

  • AT
    A tiny WASM compiler and runtime for demonstration purposes2022 · luna-demo.vercel.app · ▲48

    Hello, I'm building a WebAssembly compiler and documenting the process in the meantime. This aims to be a tool for demonstration and education purpose. It doesn't aim to do fancy stuff nor to replace existing ones. I'm building this to learn and to improve and hopefully it can be useful for others as well :) From last time I've presented the idea, I've implemented more basic features on Luna and I've built a custom and tiny runtime for Luna! (documenting it of course). Any feedback is really appreciated :) Repo: https://github.com/thomscoder/luna

  • TinyWasm – A tiny WebAssembly Runtime written in Rust2024 · github.com · ▲172

    Show HN: TinyWasm - A tiny WebAssembly Runtime written in Rust Hi HN! I'm excited to share TinyWasm (https://github.com/explodingcamera/tinywasm), a WebAssembly Interpreter I developed for my final university project. The main goal of this project was to deepen my understanding of WebAssembly and interpreter design. TinyWasm successfully passes all the official WebAssembly 1.0 tests and also includes features from future proposals such as like bulk memory operations. Initially more of a research project, TinyWasm focuses on simplicity and portability. It has minimal…

  • Firefox in WebAssemblyJul 2026 · developer.puter.com · ▲273

    This is the entire Firefox browser rendering to a element. Gecko, all UI components, and the Spidermonkey JS engine are all compiled and running in WebAssembly. Here are a few things you might find interesting: - This is fully end to end encrypted! We use the WISP protocol for TCP-over-websockets. - There is a novel WASM->JS JIT for experimental site speedup - This port cost over 25k in opus/fable tokens for debugging and JIT research This was just a fun experiment to push the boundaries of WebAssembly. For a more usable "browser in browser" experience, we also built…

  • Wasmer – A Go library for executing WebAssembly binaries2019 · github.com · ▲44

    🐹🕸️ WebAssembly runtime for Go. Contribute to wasmerio/wasmer-go development by creating an account on GitHub.

  • Jaws – a JavaScript to WASM ahead-of-time compiler2024 · github.com · ▲290

    I've open sourced a JavaScript to WASM compiler. It's an experimental tool, but given the semantics I already implemented, I'm fairly certain I am able to eventually cover 100% of JavaScript spec. Any ideas, questions or critique welcomed! If you are interested in WASM, especially with new proposals like WASM GC or exception handling, it might be a good source of seeing these features in action - the project has a few thousand lines of hand written WAT so far.

More work this month

the category →

Source: Show HN post ↗

Launched alongside, November 2022

the whole month →
  • VEED.IO▲1,623

    Simple online video editing

    Growth · 2022 · veed.io

  • Meet your new partner in thought

    AI · 2022 · app.notion.com

  • Rewind▲1,420

    The search engine for your life

    AI · 2022 · rewind.ai

  • I made a thing! In 2014, I was holding a stack of iPhones and thought to myself: "Hey, if I had each phone display a playing card, I could click a button and they'd shuffle themselves" I pared that idea all the way down to this: trading cards made of e-ink displays. Right now, each card costs me about $20 each, but with only a bit more scale, I think I can get that down to $10. In doing this project, I learned how to design electronics and circuit boards. I learned Rust and wrote my first driver, I upped my CAD skills, 3D printed, and did my first resin casting. I generated the images on the…

    Dev tools · 2022 · wyldcard.io

  • Taplio▲1,004

    The all-in-one tool to grow your personal brand on LinkedIn

    Growth · 2022 · taplio.com

  • Catch beautiful sights, finish your work before sunset

    Work · 2022