Build your own WebAssembly Compiler

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
InfluxDB high-performance time series database
Collect, organize, and act on massive volumes of high-resolution data to power real-time intelligent systems.
influxdata.com
featured
  1. wasm-micro-runtime

    WebAssembly Micro Runtime (WAMR)

    Here is what you are looking for: https://github.com/bytecodealliance/wasm-micro-runtime

  2. CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  3. w2c2

    Translates WebAssembly modules to portable C

    For AOT, the simplest approach, that actually produces the fastest native code, is to naively translate WASM opcodes to C.

    This is for example what W2C2 does: https://github.com/turbolent/w2c2

  4. design

    WebAssembly Design Documents

    As far as I can tell (5 minutes of internet research) this was to allow easier compilation to JavaScript as a fallback in the days when WASM wasn't widely supported.

    "Please add goto" issue has been open since 2016:

    https://github.com/WebAssembly/design/issues/796

    Most interesting comment:

    > The upcoming Go 1.11 release will have experimental support for WebAssembly. This will include full support for all of Go's features, including goroutines, channels, etc. However, the performance of the generated WebAssembly is currently not that good.

    > This is mainly because of the missing goto instruction. Without the goto instruction we had to resort to using a toplevel loop and jump table in every function. Using the relooper algorithm is not an option for us, because when switching between goroutines we need to be able to resume execution at different points of a function. The relooper can not help with this, only a goto instruction can.

    > It is awesome that WebAssembly got to the point where it can support a language like Go. But to be truly the assembly of the web, WebAssembly should be equally powerful as other assembly languages. Go has an advanced compiler which is able to emit very efficient assembly for a number of other platforms. This is why I would like to argue that it is mainly a limitation of WebAssembly and not of the Go compiler that it is not possible to also use this compiler to emit efficient assembly for the web.

    ^ https://github.com/WebAssembly/design/issues/796#issuecommen...

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Wasmi v0.32: WebAssembly interpreter is now faster than

    6 projects | news.ycombinator.com | 28 May 2024
  • Creating a simple WebAssembly interpreter

    1 project | /r/rust | 26 Jun 2021
  • Hello world from a WASM module in a static binary

    5 projects | dev.to | 22 Feb 2025
  • Wasm2Mpy: Compiling WASM to MicroPython so it can run in Raspberry

    8 projects | news.ycombinator.com | 20 Sep 2024
  • Show HN: RustPython for FreeDOS with W2c2

    2 projects | news.ycombinator.com | 24 Oct 2023

Did you know that C is
the 6th most popular programming language
based on number of references?