Saturday, June 28, 2025
All the Bits Fit to Print
A minimalistic C subset compiler generating optimized Web Assembly code
A new compiler called c4wa translates a simplified subset of C directly into optimized Web Assembly (WASM) code without extra runtime dependencies or embedded libraries.
Why it matters: c4wa produces minimalistic, efficient WASM binaries compatible with any runtime, avoiding bloat common in other C-to-WASM compilers.
The big picture: It targets a middle ground between writing raw WASM and using full-featured but bulky compilers like emscripten, supporting dynamic memory and common C features.
The other side: c4wa requires Java 11+, lacks full C99 support, and does not include a standard library, relying on runtime imports for OS interaction.
Commenters say: Users appreciate c4wa’s lean output and runtime-agnostic design but note missing optimizations without compiler flags and wish for more freestanding WASM tooling and standard library support.