Building Interactive C/C++ workflows in Jupyter through clang-repl
- Track: LLVM
- Room: UD6.215
- Day: Saturday
- Start: 17:55
- End: 18:15
- Video only: ud6215
- Chat: Join the conversation!
C++ remains central to high-performance and scientific computing, yet interactive workflows for the language have historically been fragmented or unavailable. Developers rely on REPL-driven exploration, rapid iteration, rich visualisation, and debugging, but C++ lacked incremental execution, notebook integration, browser-based execution, and JIT debugging. With the introduction of clang-repl, LLVM now provides an upstream incremental compilation engine built on Clang, the IncrementalParser, and the ORC JIT.
This talk presents how the Project Jupyter, Clang/clang-repl, and Emscripten communities collaborated to build a complete, upstream-aligned interactive C++ environment. Xeus-Cpp embeds clang-repl as a native C/C++ Jupyter kernel across Linux, macOS, and Windows, enabling widgets, plots, inline documentation, and even CUDA/OpenMP use cases. Xeus-Cpp-Lite extends this model to the browser via WebAssembly and JupyterLite, compiling LLVM and Clang to WASM and using wasm-ld to dynamically link shared wasm modules generated per cell at runtime.
To complete the workflow, Xeus-Cpp integrates LLDB-DAP through clang-repl’s out-of-process execution model, enabling breakpoints, stepping, variable inspection, and full debugging of JIT-generated code directly in JupyterLab.
The talk will detail how clang-repl, ORC JIT, wasm-ld, LLDB, and LLDB-DAP come together to deliver a modern, sustainable interactive C++ workflow on both desktop and browser platforms, with live demonstrations of native and WebAssembly execution along the way.
LLVM Components Involved : clang, clang-repl, orc jit, wasm-ld, lldb, lldb-dap.
Target Audience : Researchers, Educators, Students, C/C++ Practitioners
Note : Please make sure to check out the demos/links added to the Resource section. These demos would be shown live in the talk.
Speakers
| Anutosh Bhat |
Links
- Intro demo notebook - Covers Basic C++, inline docs, widgets & plots through Jupyter's rich mime type rendering
- OpenMP support
- CUDA support
- Xeus-cpp-lite demo : Covers the exact same intro demo above but completely in browser in this case.
- Smallpt demo — Uses Emscripten’s SDL support to run ray tracers and advanced graphics.
- 3rd Party Libs : Demonstrates fetching and using third-party libraries at runtime. Covers topics such as symbolic math, linear algebra, SIMD, widgets/canvases, and magic commands.
- Debugger Support demo
- My deep dive blog on Project Jupyter's Medium
- Chat room(web)
- Chat room(app)
- Submit Feedback