wasm-compatibility

Checks marimo notebooks for WebAssembly compatibility and reports lint and runtime issues.

465|41|Updated Aug 4, 2026
One-click install
npx skills add https://github.com/autonomous-ai/openharness --skill wasm-compatibility-autonomous-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wasm-compatibility
Source: https://github.com/autonomous-ai/openharness/tree/main/store/agents/marimo/skills/wasm-compatibility
Command: npx skills add https://github.com/autonomous-ai/openharness --skill wasm-compatibility-autonomous-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Marimo notebooks that work locally often fail when deployed to WebAssembly environments like the marimo playground or exported WASM HTML, due to incompatible imports, missing packages, or unsupported system calls. This Skill automates the audit so you know before publishing whether a notebook will run in the browser. ## Core Features & Use Cases - Automated lint checks: Runs marimo's built-in WASM lint rules (MW001, MW002, MW003) to detect incompatible imports, unsafe system calls, and packages without WASM wheels. - Manual runtime analysis: Flags issues static linting misses, such as missing PEP 723 dependency metadata, environment variable reads, hard-coded file paths, and concurrency code that runs sequentially in Pyodide. - Actionable fix recommendations: Suggests WASM-friendly package alternatives, cached execution with cache_cells = true and marimo export html-wasm --execute, or browser-native compatibility layers like ONNX Runtime. - Use Case: Before sharing a data analysis notebook as an interactive WASM HTML export, run this check to discover that torch has no WASM build, then apply the cached-execution escape hatch so the export bundles precomputed results. ## Quick Start Check whether my notebook analysis.py is compatible with marimo's WASM playground and tell me how to fix any problems.

Frequently Asked Questions about wasm-compatibility

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check if a marimo notebook works in WASM?

Run marimo check with the MW lint rules (marimo check notebook.py --select MW --format json) to catch incompatible imports, unsafe system calls, and packages without WASM wheels. Then manually review PEP 723 metadata, environment variable usage, and concurrency patterns that static linting misses.

How to fix a package that has no WASM build in marimo?

Exclude the package with a sys_platform != 'emscripten' marker, enable cache_cells = true, and export with marimo export html-wasm --execute so results are precomputed server-side. For continuous input spaces, use a browser-native layer like moutils.onnx.OnnxRuntime instead.

Does PyTorch or TensorFlow work in marimo WASM notebooks?

No, torch, tensorflow, and jax have C++ extensions with no Pyodide builds. You can still use them indirectly by caching execution server-side and exporting with --execute, so the browser only reads cached results.

Why does my marimo WASM notebook fail even though lint passes?

Lint rules miss runtime-only patterns like os.environ reads, hard-coded absolute paths, and attribute-access imports such as multiprocessing.Lock() after a bare import. Packages excluded by sys_platform markers also skip MW003 checks but still fail at runtime without cached execution.

Does multiprocessing work in Pyodide WASM notebooks?

Process, Queue, Pool, and ProcessPoolExecutor run on cooperative adapters, but there are no OS threads, shared memory, or true parallelism. Code relying on actual concurrent speedup runs correctly but sequentially in the single Pyodide interpreter.

What are the memory limits for marimo WASM notebooks?

WASM notebooks are capped at 2GB of memory. Large in-memory datasets that exceed this limit will fail in the browser, so reduce dataset size or precompute results server-side before export.