▲ 20 r/Compilers+2 crossposts

What if real compiler infrastructures could run entirely inside the browser ? LLVMLite in the browser

Hi,

Anutosh Bhat, a colleague of mine, just posted this on Linkedin:

>What if real compiler infrastructures could run entirely inside the browser? > >I’ve successfully patched llvmlite for JupyterLite, making it possible to build >LLVM IR, run optimization passes, visualize control-flow graphs, compile to >WebAssembly and execute the result — without a native LLVM setup or server-side >kernel. > >I’ve shared a step-by-step notebook showing how a loop evolves from stack-based IR >to SSA, then to an LICM-style form, into a fully optimized closed form, eventually >to benchmark all of these steps. > >The bigger idea is a zero-install compiler workbench for reproducible optimization >experiments, lightweight compiler prototyping, IR debugging, custom code->generation pipelines, shareable research demos, and eventually interactive >tutorials and compiler courses. > >Try out the interactive notebook using notebook.link: https://notebook.link/@anutosh491/llvmlite > >I’m also in the process of bringing MLIR Python bindings into the same JupyterLite >and WebAssembly environment, starting with a 2D CNN-style Conv2D + bias + ReLU >kernel. I’ll share the full pipeline in a separate technical blog post soon. > >I’ve also started patching Numba for Wasm and have simple scalar u / jit functions >running inside JupyterLite. Array and tensor workloads are the next challenge. > >I’m keen to take this further. If you’re working on LLVM, MLIR, Numba, WebAssembly >or browser-native developer tools — or see a real use case for this — I’d be >interested in connecting with teams looking to collaborate, support the work or >explore what we could build together.

Next step is to patch Numba to get scalar jit !: https://www.linkedin.com/feed/update/urn:li:ugcPost:7485014172934541312/?dashCommentUrn=urn%3Ali%3Afsd_comment%3A%287485014751178211329%2Curn%3Ali%3AugcPost%3A7485014172934541312%29

linkedin.com
u/alexis_placet — 30 days ago

emscripten-forge: a conda‑forge‑style package ecosystem for emscripten-wasm32

emscripten‑forge is essentially a conda‑forge‑style channel for the emscripten-wasm32 platform. It lets you build and install conda‑compatible packages that target WebAssembly via Emscripten, using the same recipes and tooling you already use on native platforms.

What it does:

  1. Use conda‑forge style recipes (often via emscripten-forge/recipes) and builds them for emscripten-wasm32.
  2. Outputs Wasm‑compatible binaries (.wasm + JS glue) that can be consumed in the browser or other Wasm runtimes.
  3. Published on https://prefix.dev/channels/emscripten-forge-4x
  4. Lets you install them with conda/mamba/micromamba just like regular conda‑forge packages: mamba install -c emscripten-forge some-package

One real‑world example is JupyterLite Xeus, which runs entirely in‑browser via WebAssembly and uses emscripten‑forge built packages for the runtime. This stack is live on https://notebook.link, where you can run numpy, onnx-runtime, Apache Arrow and other C/C++ based libraries in the browser without any local installation.

emscripten-forge.org
u/alexis_placet — 3 months ago