Repository

AJTimePyro/cppbolt

Cppbolt

Open github.com

AJTimePyro/cppbolt

Cppbolt

A dependency-free C++ to WebAssembly subset compiler written in Rust. Compiles a defined subset of C++17 directly into .wasm binaries without LLVM or Emscripten. Includes CLI, npm package, and browser playground.

Visit project

Show me a random project

First shared
Nov 4, 2026
HN activity
34

Show HN@ajtimepyroNov 4, 2026

Show HN: Cppbolt – A lightweight C++ to WebAssembly compiler written in Rust

Hey HN! I've been working on cppbolt, a lightweight C++ to WebAssembly compiler written in Rust. The idea was to build something that can compile and run C++ directly in the browser without downloading a massive LLVM/Clang toolchain. Unlike projects that bundle LLVM/Clang and can require 100+ MB of compiler assets, cppbolt's compiler payload is around 1 MB. It compiles a supported subset of C++17 directly to standard WebAssembly binaries. Some things it supports: - Classes, inheritance, virtual functions and operator overloading - Templates and a subset of the C++ standard library - Pointers, references, arrays and dynamic memory - Lambdas, structured bindings and range-based loops It comes with a browser playground, CLI and npm package. A few caveats: this is still a work in progress, it doesn't implement the full C++17 standard, and it might not work as expected with certain C++ programs. I'm particularly interested in feedback on the compiler architecture, language support and potential use cases and also interested in connecting with someone who might want to use it in their application. Try it out: - Playground: https://ajtimepyro.is-a.dev/cppbolt/ - Docs: https://ajtimepyro.is-a.dev/cppbolt/book/ - GitHub: https://github.com/AJTimePyro/cppbolt - npm: https://www.npmjs.com/package/cppbolt Would love to hear what you think, especially from people who've worked on compilers or WebAssembly.

Community

Hacker News discussion

Loading the thread…