Cppbolt
Cppbolt is a lightweight C++ to WebAssembly compiler written in Rust that compiles a supported subset of C++17 directly to standard WebAssembly binaries, enabling C++ to run directly in the browser without a large LLVM/Clang toolchain. It ships with a browser playground, CLI, and npm package; it is still a work in progress and does not implement the full C++17 standard, and its development was AI-assisted with the author reviewing committed code.
What it addresses
Compiling and running C++ directly in the browser without downloading a massive LLVM/Clang toolchain, since existing projects that bundle LLVM/Clang can require 100+ MB of compiler assets while cppbolt's compiler payload is around 1 MB.
Shared over time
Each entry reflects what was shared on that date. Details may have changed since then.
Cppbolt
Cppbolt is a lightweight C++ to WebAssembly compiler written in Rust that compiles a supported subset of C++17 directly to standard WebAssembly binaries, enabling C++ to run directly in the browser without a large LLVM/Clang toolchain. It ships with a browser playground, CLI, and npm package; it is still a work in progress and does not implement the full C++17 standard, and its development was AI-assisted with the author reviewing committed code.
Problem: Compiling and running C++ directly in the browser without downloading a massive LLVM/Clang toolchain, since existing projects that bundle LLVM/Clang can require 100+ MB of compiler assets while cppbolt's compiler payload is around 1 MB.
Posted by @ajtimepyro · Original source ↗
Story title · @ajtimepyro · · Source ↗
Show HN: Cppbolt – A lightweight C++ to WebAssembly compiler written in Rust
Submitted URL · @ajtimepyro · · Source ↗
https://github.com/AJTimePyro/cppbolt
Source text · @ajtimepyro · · Source ↗
I've been working on cppbolt, a lightweight C++ to WebAssembly compiler written in Rust.
Source text · @ajtimepyro · · Source ↗
The idea was to build something that can compile and run C++ directly in the browser without downloading a massive LLVM/Clang toolchain.
Source text · @ajtimepyro · · Source ↗
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.
Source text · @ajtimepyro · · Source ↗
It comes with a browser playground, CLI and npm package.
Source text · @ajtimepyro · · Source ↗
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.
Source text · @ajtimepyro · · Source ↗
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
Source text · @ajtimepyro · · Source ↗
AI assisted me during development of this project, but it's not like a blind vibe coding, I always review the end code before committing them. Also it's a subset of C++ 17, so it still misses a lots of thing