Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

JupyterLite: Jupyter in the Browser with WebAssembly

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Overview

JupyterLite is a JupyterLab and Jupyter Notebook distribution that runs entirely in the browser via WebAssembly (Wasm) and Web Workers. Because code execution, file storage, and the UI all live client-side, a compiled JupyterLite deployment consists purely of static assets—no Python server, container orchestrator, or backend kernel is required.

Architecture & Kernels

Core JupyterLite ships without a default kernel; you bundle one or more browser-compatible kernels when building the static site:

  1. Pyodide (jupyterlite-pyodide-kernel):

    • Runs CPython compiled to WebAssembly via Emscripten, backed by IPython (supporting IPython magics and inline Matplotlib).

    • Pure-Python wheels from PyPI can be installed at runtime using piplite (built on micropip), e.g., await piplite.install("ipywidgets").

  2. Xeus (jupyterlite-xeus / jupyterlite-xeus-python):

    • Loader for Xeus-based kernels (including xeus-python, C++, Lua, and SQLite) compiled to WebAssembly.

    • Pre-built scientific packages (including many C/C++ extensions) are pulled from emscripten-forge via Conda/Mamba tooling, and environments can be pre-configured at build time with an environment.yml file.

  3. Client-Side Storage:

    • Notebooks and workspace files are persisted in the browser’s IndexedDB / localStorage.

    • Storage is per-origin and ephemeral if browser site data is cleared, so important .ipynb files should be downloaded or synced externally.

Quick Start & Static Deployment

Install jupyterlite-core along with a kernel package, build the static site, and preview it locally:

pip install jupyterlite-core jupyterlite-pyodide-kernel
# Or use xeus-python instead:
# pip install jupyterlite-xeus-python

jupyter lite build --contents ./notebooks
jupyter lite serve

jupyter lite build outputs a self-contained static directory (_output/ by default) that can be deployed directly to GitHub Pages, GitLab Pages, Read the Docs, Netlify, or embedded alongside documentation in Jupyter Book / MyST sites.

Strengths & Limitations

Strengths

Limitations

Comparison with Alternatives

Feature / DimensionJupyterLiteBinderJupyterHubMarimo (Wasm)
Execution locationBrowser (Wasm)Cloud containersManaged server / K8sBrowser (Wasm / Pyodide)
Backend requiredNo (static files)Yes (ephemeral)Yes (persistent)No (static files)
Startup latencyFast (browser cache)Slow (image pull/build)Fast–MediumFast (browser cache)
Native C/GPU/socketsNoYes (CPU; limited)YesNo
Notebook formatStandard .ipynbStandard .ipynbStandard .ipynbReactive .py

References