finds.dev← search

// the find

LingDong-/wax

★ 853 · C · MIT · updated Mar 2025

A tiny programming language that transpiles to C, C++, Java, TypeScript, Python, C#, Swift, Lua and WebAssembly 🚀

Wax is a minimal language that transpiles to nine targets — C, C++, Java, TypeScript, Python, C#, Swift, Lua, and WebAssembly — by deliberately being the boring intersection of all of them. The S-expression syntax makes you write ASTs by hand, which is either elegant or painful depending on your tolerance for Lisp aesthetics applied to imperative code. It's for people who need to ship the same algorithm in multiple languages without maintaining multiple codebases.

The single-file C99 compiler with zero dependencies is genuinely impressive — `gcc src/wax.c -o waxc` and you're done. The generated output is intentionally readable and editable rather than machine-soup, which is a real design constraint that most transpilers ignore. The WebAssembly backend is a legitimate target, not an afterthought, with a handwritten `.wat` stdlib for memory allocation, maps, and strings. The macro system lets you inject target-specific code when the abstraction breaks down, which is the honest answer to 'what happens when targets differ.'

No OOP and no first-class functions means you're writing C with extra syntax — fine for algorithms but limiting for anything that models a domain. The language has been effectively dormant since early 2025 and was still 'experimental' at that point, so bug fixes aren't coming and the issue tracker is where edge cases go to die. The Python output has a known rough edge: Python's dynamic typing means the transpiler has to paper over type mismatches that C would catch at compile time. There's no package system, no module imports beyond `@include`, so any real project ends up as one giant file or a manual concatenation step.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →