Software

WASM wheels can now be published to PyPI for Pyodide

Pyodide 314.0 allows any maintainer to distribute Python packages compiled to WebAssembly directly on PyPI, eliminating the centralized maintenance bottleneck.

June 15, 2026 · 3 min read

monitor showing Java programming

TL;DR: Pyodide 314.0 and a PR on PyPI allow publishing WASM wheels directly on the official repository. Now any maintainer can distribute packages with native extensions for Python in the browser, just like for Linux, macOS, or Windows.

What happened?

On June 13, 2026, Simon Willison documented on his blog a long-awaited milestone: the publication of Python packages compiled to WebAssembly (WASM) as wheels on PyPI, compatible with the Pyodide runtime. This was made possible thanks to PR #19804 in the PyPI repository, merged on April 21, 2026, and the announcement of Pyodide 314.0.

Previously, Pyodide maintainers had to compile, host, and maintain over 300 packages themselves, which was a significant burden and a bottleneck for the community. Now, any developer can compile their package to WASM using cibuildwheel and upload it to PyPI as a wheel with the platform pyemscripten_2026_0_wasm32, defined in PEP 783.

Why is this important?

Pyodide is a Python interpreter compiled to WebAssembly that runs in the browser. Until now, packages with native extensions (C, C++, Rust) were difficult to distribute: there was no standard mechanism to upload them to PyPI and have Pyodide install them at runtime. This severely limited the Python ecosystem in the browser, forcing users to rely on a small set of centrally maintained packages.

With this development, the workflow becomes the same as for native packages on Linux, macOS, or Windows: the maintainer compiles the wheel for the WASM platform and publishes it on PyPI. Pyodide users can install these packages with micropip.install('package-name') transparently.

Practical example: luau-wasm

Simon Willison created an example package, luau-wasm, which wraps the Luau language (a dialect of Lua with gradual typing, developed by Roblox) compiled to WASM. The wheel weighs only 276 KB and can be used in the Pyodide REPL with a few lines of code:

import micropip
await micropip.install("luau-wasm")
import luau_wasm
print(luau_wasm.execute(r'''
local animals = {"fox", "owl", "frog", "rabbit"}
table.sort(animals, function(a, b) return #a < #b end)
for i, name in animals do print(i .. ". " .. name .. " (" .. #name .. ")") end
'''))

The source code and build scripts are available on GitHub, demonstrating how easy it is to replicate the process.

Implications for the ecosystem

  • Decentralized maintenance: Maintainers of popular packages (NumPy, Pandas, etc.) can now publish WASM versions without waiting for Pyodide to include them. This will accelerate the availability of scientific libraries in the browser.
  • Increased adoption of Pyodide: By removing distribution friction, more developers will consider Pyodide as a platform for web applications that require client-side Python logic.
  • Standardization: PEP 783 defines the PyEmscripten platform, ensuring compatibility across different Python WASM runtimes, not just Pyodide.
  • New use cases: Educational applications, interactive data visualization tools, Jupyter notebooks in the browser, and games can benefit from native packages compiled to WASM.

What readers should know

If you are a maintainer of a Python package with native extensions, you can now add WASM support using cibuildwheel and configure your CI to compile for the pyemscripten_2026_0_wasm32 platform. The Pyodide documentation and the luau-wasm example are good starting points.

If you are a Pyodide user, you will soon be able to install many more packages directly from PyPI without custom builds. Just make sure you are using Pyodide 314.0 or later.

"Moving forward, package maintainers can simply build and publish Pyodide wheels to PyPI, just as they do for native wheels on Linux, macOS, or Windows." — Pyodide 314.0 announcement

Limitations and considerations

Although this is a major step forward, not all packages will benefit immediately. Extensions that depend on system libraries (such as OpenGL or networking libraries) may not be compatible with WASM. Additionally, performance in the browser is still limited by the WASM sandbox, though it is sufficient for many use cases.

The cross-compilation process can be complex for packages with deep native dependencies, but tools like cibuildwheel and Emscripten simplify the task.

Conclusion

The publication of WASM wheels on PyPI marks a before and after for Python in the browser. Just as the adoption of many wheels simplified package installation on desktop, this standardization will do the same for the web ecosystem. Pyodide is no longer a niche project and is consolidating as a viable platform for running Python on the client side, with a clear path for any package to become available.

Keep reading