Expose Pyodide and PyPI source URLs for offline WASM exports
Description
Related: original issue #9811 (https://github.com/marimo-team/marimo/issues/9811), PR #10879 (https://github.com/marimo-team/marimo/pull/10879), PR #10920 (https://github.com/marimo-team/marimo/pull/10920) Issue #9811 requested configurable asset URLs to support self-hosted and offline WASM notebooks. PR #10879 added offline HTML-WASM exports and runtime source configuration, and PR #10920 followed up by passing the marimo version through the runtime config. There appears to be a remaining gap for users who need to build offline exports using corporate or otherwise custom package mirrors. When running marimo export html-wasm --offline, the exporter still uses its default sources to obtain Pyodide resources and resolve Python packages. Could the offline export CLI expose options to override the Pyodide index URL and PyPI index URL? The initial need is for one PyPI mirror URL. Ideally, a CDN-compatible Pyodide mirror could also provide the stock Pyodide lockfile. The resulting export would continue to bundle the resources it needs alongside the HTML. Is anyone on the marimo team already working on configurable source URLs for offline exports, or would this be a reasonable follow-up to #10879? Relevant implementation files
- marimo/_cli/export/commands.py — html-wasm --offline CLI options and wiring
- marimo/_export/offline.py — offline source defaults and resource bundling
- marimo/_schemas/export_options.py — WASMRuntimeConfig
- marimo/_templates.py — runtime source attributes embedded in exported HTML
- frontend/src/core/wasm/runtime-config.ts and frontend/src/core/wasm/worker/bootstrap.ts — runtime config parsing and use
The scope is intentionally limited to export-time source overrides for --offline; it doesn’t propose changing the broader runtime URL configuration.
Are you willing to submit a PR? (You must receive approval from the team before submitting a PR.)
- Yes
Alternatives
Post runtime shim script to artificially download pypi wheels and pyodide assets into proper export locations, but is fragile and doesn't utilize existing work done in previous PRs.
Additional context
No response
Source: marimo-team/marimo