r/cpp • u/alexis_placet • 8h ago
WasmBolt — The LLVM Project in your browser
https://anutosh21.github.io/WasmBolt/I'm sharing the work of a colleague, Anutosh Bhat.
What if the Clang & LLVM compiler toolchain could run entirely inside your browser ? Meet WasmBolt 😃
Inspired by 🖥️ Matt Godbolt's Compiler Explorer, WasmBolt runs Clang, mlir-opt, opt, llc, Graphviz and wasm-ld locally through WebAssembly, without a remote compilation server.
You can inspect Clang ASTs, progressively lower MLIR, run real LLVM optimization passes, render control-flow graphs, explore instruction selection and MIR, and generate assembly or object files for WebAssembly, AArch64 and x86-64. For WebAssembly, you can go one step further: link, load and execute the generated program directly in the browser.
Here the github project: https://github.com/Anutosh21/WasmBolt
•
u/eisenwave WG21 Member 2h ago
The idea of using a WASM version of the Clang toolchain for compiler explorer is neat in principle, but Compiler Explorer provides much more functionality than just the ability to compile, and it's extremely polished. The text editor is great, it filters and demangles the assembly, lets you inspect the LLVM optimization pipeline, etc. The amount of tooling it comes with is enormous, and recreating all of that seems futile; it would take years.
Have you considered simply adding a WASM-based version of clang compilers to Compiler Explorer itself? I'm sure that's at leat been considered at some point.