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.toml—python/python 3.13,/site-packages = ./wasmer-depsapp.yaml— regionfr-roub1,datavolume at/datascripts/run_marimo.py— boot: headlessmarimo editon: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:
| pkg | verdict | evidence |
|---|---|---|
| msgspec | absent — pin dodges it entirely | 0.14.17 requires_dist has no msgspec |
| psutil | excised (lazy only: TYPE_CHECKING + 2 function-local imports) | wasmer-deps/marimo/_cli/development/commands.py:19,310, _server/api/endpoints/health.py:195 |
| loro | excised (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 fallbacks | 0 .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):
marimo editspawns kernel processes (multiprocessing) — needs fork/spawn support from the WASIX runtime, unverified on Edge./healthresource sub-endpoint 500s without psutil (base endpoint fine); RTC collab is disabled without loro.- 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 .):
- Stale import cache:
/data/wasmer-depsis created at runtime by extracting the tarball, but CPython caches the missing dir at startup. Every import failed untilrun_marimo.pycallsimportlib.invalidate_caches()after extraction. - LSP port probing:
marimo editconstructsCompositeLspServerat startup, which bind-probes TCP ports the sandbox forbids (RuntimeError: Could not find a free port). The vendoredmarimo/_server/start.pynow skips LSP construction unlessMARIMO_ENABLE_LSP=1(falls back toNoopLspServer— 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).