source: simon willison: publishing wasm wheels to pypi for use with pyodide
level: technical
pyodide 314.0 lets package authors publish webassembly wheels to pypi, matching the workflow for native linux, macos, or windows wheels. before this change, the pyodide team had to build and host over 300 packages themselves, which created a heavy maintenance load and slowed community growth. now, any package compatible with the pyemscripten platform defined in pep 783 can be uploaded to pypi and installed at runtime using micropip.
the author tested the new capability by packaging a luau webassembly experiment into a pypi package called luau-wasm. the package includes a 276kb wheel file that can be installed in pyodide with micropip.install("luau-wasm") and used to execute luau scripts directly in the browser. the build and deployment process uses github actions and cibuildwheel, and the project also provides an html demo page for interactive testing.
a query against pypi's public dataset on bigquery shows 28 packages currently publishing wheels with the new pyemscripten tags, including pydantic_core, onnx, and tcod. this early adoption suggests the ecosystem will grow as more maintainers add webassembly builds to their release pipelines. the change lowers the barrier for running python packages with c or rust extensions in the browser, making pyodide more practical for a wider range of applications.
why it matters: data scientists can now run more python packages directly in the browser without server-side execution, simplifying interactive demos and client-side analysis.
source: simon willison: publishing wasm wheels to pypi for use with pyodide