Command Palette

Search for a command to run...

ppang0405/marimo-notebooks
Public
wasmer run ppang0405/marimo-notebooks

marimo-notebooks on Wasmer Edge

Thin deploy wrapper around the marimo PyPI package (source cloned at ../marimo for reference/patching only — it is NOT deployed).

Layout mirrors the proven javbox Edge app (uvicorn + vendored deps):

  • wasmer.tomlpython/python 3.13, /site-packages = ./wasmer-deps
  • app.yaml — region fr-roub1, data volume at /data
  • scripts/run_marimo.py — boot: headless marimo edit on :8000, token auth

Deploy: cd marimo-wasmer && wasmer deploy (public URL gets token login).

WASIX notes (verified 2026-09-13, marimo 0.14.17)

Current marimo (0.24.x) is undeployable: msgspec is a C-only core dep with module-level imports (marimo/_ast/cell.py:12 etc., ~172 Struct uses) and no WASIX wheel — shimming it is infeasible. So we pin marimo==0.14.17, the newest msgspec-free release (0.15.0+ requires msgspec>=0.19.0; verified via PyPI requires_dist). 0.14.x also has no pyzmq dep.

wasmer-deps had 4 compiled packages; all resolved, import-clean locally:

pkgverdictevidence
msgspecabsent — pin dodges it entirely0.14.17 requires_dist has no msgspec
psutilexcised (lazy only: TYPE_CHECKING + 2 function-local imports)wasmer-deps/marimo/_cli/development/commands.py:19,310, _server/api/endpoints/health.py:195
loroexcised (RTC collab degrades gracefully: close ws + warning)ws.py:42 TYPE_CHECKING, ws.py:136 gated on DependencyManager.loro.has() (returns False locally)
pyyaml _yaml.so, websockets speedups.so.so deleted, pure-Python fallbacks0 .so left in wasmer-deps

Local smoke (0.14.17): / → 303 (token login), /health → 200, --headless/--host/--port/--token-password/--no-sandbox/--skip-update-check all present in marimo edit --help — no script changes needed.

Remaining risks (only a real Edge deploy can settle these):

  1. marimo edit spawns kernel processes (multiprocessing) — needs fork/spawn support from the WASIX runtime, unverified on Edge.
  2. /health resource sub-endpoint 500s without psutil (base endpoint fine); RTC collab is disabled without loro.
  3. 0.14.17 is ~8 months old: older editor UI, no collab, thin AI features.

v0.3.3 Edge boot fixes (2026-09-14)

Two real blockers found on Edge (both reproduced locally via wasmer run .):

  1. Stale import cache: /data/wasmer-deps is created at runtime by extracting the tarball, but CPython caches the missing dir at startup. Every import failed until run_marimo.py calls importlib.invalidate_caches() after extraction.
  2. LSP port probing: marimo edit constructs CompositeLspServer at startup, which bind-probes TCP ports the sandbox forbids (RuntimeError: Could not find a free port). The vendored marimo/_server/start.py now skips LSP construction unless MARIMO_ENABLE_LSP=1 (falls back to NoopLspServer — no editor autocomplete, but the notebook itself is unaffected).

DEPS_VER (0.14.17-nolsp1) forces one re-extract of the fixed tarball onto the Edge volume; later boots hit the cache and start fast.

Fallback if the Edge boot fails: marimo export html (static read-only notebooks on wasmer/static-web-server).

Marimo reactive notebooks on Wasmer Edge (marimo pinned to 0.14.17: newest msgspec-free release)