DEV Community

sinisterMage
sinisterMage

Posted on

W++ Compiles to WebAssembly: Building a Custom Language for the Browser

W++ Compiles to WebAssembly 🎉

Hey everyone! I'm super excited to share that W++, my custom scripting language, can now be compiled directly to WebAssembly — and it runs in the browser!

What is W++?

W++ is a Python-style scripting language I’ve been working on for fun, chaos, and learning. It compiles to .NET IL, and now... it also runs on the web thanks to WASM.

What’s New in the WASM Version?

  • ✅ No more Blazor or .NET runtime
  • ✅ Custom WASM bytecode generation using wasm-encoder
  • ✅ Pure WebAssembly — W++ compiles straight to WASM
  • ✅ Works in Node.js and the browser

But... HTML?

Yes, technically there’s still a tiny bit of HTML and JavaScript glue to boot the WASM module (because browsers need it). But no frameworks, no shadow DOM, no Blazor overhead. Just pure WASM.

Why?

I wanted to see if I could make a language truly own the web, without depending on the usual tech stack. And maybe... just maybe... kill HTML in the process 😄

Demo?

You can check the GitHub repo here: https://github.com/sinisterMage/WPlusPlusWASM

It includes:

  • The W++ compiler code
  • A working WASM module generator
  • Browser and Node.js runtimes
  • A hilarious war on HTML

What’s next?

  • WASM support for more W++ features (loops, functions, etc.)
  • Maybe some kind of GUI layer
  • Pushing the limits of what W++ can do on the web

Thanks for reading! I’d love to hear your thoughts, ideas, or memes about this project ❤️

Top comments (0)