Hacker GitHub

← All repos

turbolent/w2c2

View on GitHub ↗ ★ 831 WebAssembly

Translates WebAssembly modules to portable C

8 mentions on Hacker News by 8 people: 3 stories, 5 comments · first 2021-12-22 · latest 2025-08-22

Mentions per year 8 mentions · busiest year 2023 (5)
20082026
  1. Looks like there is a project to transpile WASM w/ WASI APIs to portable C: https://github.com/turbolent/w2c2 Sadly it doesn't seem to support the networking parts of WASI, though. If it did, then it might even be possible to port all the…
    comment by piperswe · 2025-08-22 · in Show HN: OS X Mavericks Forever
  2. …fastest native code, is to naively translate WASM opcodes to C. This is for example what W2C2 does: https://github.com/turbolent/w2c2
    comment by jedisct1 · 2023-12-03 · in Build your own WebAssembly Compiler (2019)
  3. RustPython for DOS This uses https://github.com/turbolent/w2c2 to convert RustPython, built for the wasm32-wasi platform, to C89, which is then compiled with DJGPP and linked to the w2c2 wasi runtime library. rustpython-nofreeze.exe is…
    comment by coolcoder613eb · 2023-10-24 · in Show HN: RustPython for FreeDOS with W2c2
  4. …a C compiler for it, just use https://github.com/WebAssembly/wabt/blob/main/wasm2c/README.... or https://github.com/turbolent/w2c2 That way, you get the portability of C, the optimisation power of GCC or your favourite C compiler and the…
  5. …but the one bullet point there seems promising: > Coremark 1.0: ~7% slower than native [0] [0] https://github.com/turbolent/w2c2#performance
    comment by cylon13 · 2023-01-23 · in Rust on macOS 9
  6. ▲ 6
    W2c2: Translates WebAssembly Modules to C
    story by davikr · 2023-01-23 · 0 comments
  7. ▲ 3
    W2c2: Translate WebAssembly Modules to C
    story by ingve · 2022-01-24 · 0 comments
  8. ▲ 4
    W2c2: Translates WebAssembly Modules to C
    story by todsacerdoti · 2021-12-22 · 0 comments