Skip to Main Content
Talk Intermediate BSD-3-Clause for xeus/xeus-cpp/xeus-lite; Apache-2.0 WITH LLVM-exception for LLVM/clang-repl; CC BY-SA 4.0 for slides.

Compiled Languages in Jupyter: REPLs, ORC JIT, and WebAssembly Across C++, Swift, and Fortran

Proposal status is Rejected
Session Description

Compiled languages such as C++, Swift, and Fortran are traditionally experienced through ahead-of-time compilation: write a program, build it, run it, inspect the result, and repeat. That model works well for production software, but it is awkward for exploratory programming, scientific computing, teaching, visualization, and rapid experimentation, where users expect REPL-style execution, notebooks, rich outputs, package access, and debugging.

This talk presents an open source architecture for bringing compiled languages into Jupyter through compiler-native REPLs and kernels. The core idea is shared across projects such as clang-repl/xeus-cpp, swift-repl/xeus-swift, and LFortran/xeus-lfortran: reuse the language’s real compiler frontend, preserve the semantics and optimization pipeline of the compiled language, and swap the traditional “compile a whole program” model for incremental execution inside notebook cells.

On native platforms, these systems can use LLVM ORC JIT to compile and execute code interactively while still allowing access to compiled libraries, rich Jupyter display, widgets, plotting, threading, OpenMP, CUDA, and debugger support. In the browser, the execution model changes: the compiler toolchain is built to WebAssembly, cells are compiled to wasm objects, linked with wasm-ld, and loaded dynamically inside JupyterLite. This makes it possible to run C++, Swift, and Fortran-style notebook workflows without a local toolchain.

The talk will use xeus-cpp, xeus-cpp-lite, xeus-swift, and xeus-lfortran as concrete examples of a broader pattern: if a language has a compiler stack, an incremental execution model, and a Jupyter kernel interface, it can become an interactive computing environment. Along the way, we will discuss clang-repl, Swift and LFortran REPLs, ORC JIT, wasm-ld, LLDB-DAP, JupyterLite, conda-forge, and emscripten-forge, and show how these open source ecosystems fit together.

The goal is not only to demonstrate interactive C++, Swift, and Fortran notebooks, but to show how compiler infrastructure can make traditionally compiled languages feel exploratory, shareable, debuggable, and browser-native.

Key Takeaways
  • Compiled languages do not have to be limited to ahead-of-time workflows; compiler-native REPLs can make them interactive.

  • Jupyter provides a reusable interface for rich display, widgets, plots, documentation, package usage, and exploratory execution across languages.

  • Native compiled-language notebooks can use LLVM ORC JIT while preserving access to real compiler frontends, optimizations, libraries, OpenMP/CUDA workflows, and debugger support.

  • Browser-based notebooks require a different execution model: WebAssembly objects, wasm-ld, dynamic loading, JupyterLite, and packages from ecosystems such as emscripten-forge.

  • The same architecture can generalize beyond C++ to Swift, Fortran, DSLs, and other languages that lower through modern compiler infrastructure.

  • Attendees will leave with a mental model for how clang-repl/xeus-cpp, xeus-swift, and xeus-lfortran fit into a broader open source ecosystem for interactive compiled languages.

References

Session Categories

Engineering practice - productivity, debugging
Introducing a FOSS project or a new version of a popular project
Tutorial about using a FOSS project
Talk License: BSD-3-Clause for xeus/xeus-cpp/xeus-lite; Apache-2.0 WITH LLVM-exception for LLVM/clang-repl; CC BY-SA 4.0 for slides.

Which track are you applying for?

Compilers, Programming Languages and Systems

Speakers

Anutosh Bhat
Anutosh Bhat Open Source Source Consultant | QuantStack

Jupyter, LLVM, Clang, Swift, LFortran, Conda-forge, Emscripten-forge, Contributor & Maintainer.