DevTrends开发者趋势
主题色

ajtimepyro /

cppbolt

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 LLV…

DT研究与学习DT命令行工具DT库 / SDKDT终端

关于

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.

收录记录

  1. Show HN

    2026年11月5日 · 1 次收录

讨论这个产品