AIニュース最前線
最新ニュースAI日報Hacker日報週報動画AIツールトレンド企業

AIニュース最前線

世界中のAI最新情報を日本語で毎時更新

最新ニュース日報トレンド企業プレミアムRSS
© 2026 ainew.jp特定商取引法に基づく表記
ニュース一覧元記事を開く
Simon Willison Blog·2026年6月14日 08:55·約4分で読める

Pyodide で利用可能な WASM ウィールを PyPI に公開する方法

#Pyodide#WebAssembly#PEP 783#Python Ecosystem#Open Source
TL;DR

Pyodide 3.14 リリースに伴い、WASM ベースの Python パッケージを PyPI に直接公開・インストール可能になり、ブラウザ上での Python エコシステムが劇的に拡張された。

AI深層分析2026年6月14日 10:01
4
重要/ 5段階
深度40%
5
関連度30%
4
実用性20%
5
革新性10%
4

キーポイント

1

PyPI への WASM ウィール公開機能の実装

PEP 783 で定義される PyEmscripten プラットフォーム向けに、Python パッケージを PyPI に直接公開し、ランタイムでインストールできるようになった。

2

コミュニティの負担軽減とボトルネック解消

従来は Pyodide メンテナーが 300 以上のパッケージを手動で管理・レビューする必要があったが、今後は開発者がネイティブ環境と同様に直接公開できるため、維持コストが大幅に削減される。

3

Luau WASM パッケージの実証事例

Simon Willison 氏自身が Roblox 製の言語「Luau」を WebAssembly にコンパイルし、GitHub Actions を活用して PyPI に公開する実証を行い、その成功を確認した。

4

micropip を介した簡単なインストール

ブラウザ上の Pyodide 環境において、micropip ライブラリを使用して新しい WASM パッケージを簡単にインストール・利用できるようになった。

影響分析・編集コメントを表示

影響分析

この変更は、ブラウザ上で動作する Python アプリケーションの開発と配布のあり方を根本から変えるものです。これまで Pyodide の公式リポジトリに依存していた制限を解くことで、世界中の開発者が独自の WASM ベースライブラリを即座に共有できるようになり、Web 技術における Python の利用可能性が劇的に高まります。特にデータ分析や科学計算の分野で、ネイティブ環境と同等の体験をブラウザ上で提供できるエコシステムが急速に成長するでしょう。

編集コメント

ブラウザ上で Python を動かす際の最大のボトルネックであった「パッケージ配布の難易度」が解消され、Web 技術と Python の融合がさらに加速する画期的なニュースです。

Pyodide 314.0 リリースの発表(Hacker News を経由)には、私が長年待ち望んでいたニュースが含まれています:

今や、Pyodide(または PEP 783 で定義された PyEmscripten プラットフォーム に互換性のある任意の Python ランタイム)向けにビルドされた Python パッケージを、直接 PyPI に公開し、実行時にインストールすることが可能になりました。

以前は、Pyodide のメンテナーが 300 以上のパッケージ自体を維持・構築・ホストする必要があり、これはメンテナーにとって大きな負担となり、コミュニティにおける主要なボトルネックとなっていました。なぜなら、新しいパッケージごとに手動でのレビューが必要だったからです。

今後は、パッケージのメンテナーは、Linux、macOS、Windows のネイティブ用ホイールで行うのと同じように、Pyodide 用のホイールを構築して PyPI に公開するだけで済みます。

これは 4 月 21 日にマージされた、この機能をサポートする PyPI 自体への PR です。

私は Pyodide を愛していますが、過去にはこの制限に frustration を感じていました。C や Rust の拡張をホイールファイル内で WASM にコンパイルすることは可能ですが、これまでそれを配布するための簡単な方法はありませんでした。

多くの人々の努力のおかげで、その問題は解決されました!

luau-wasm で試してみる

お祝いも兼ねて、パッケージ化できるものを探してみました。実験的な Pyodide プロジェクトがいくつか手元にありますが、今回の目的に最も適しているのは、3 月 9 日に公開した Luau WebAssembly 研究スプイク のようです。

Luau は、「段階的型システムを備えた、小さく高速で埋め込み可能なプログラミング言語」であり、Lua をベースにしています。これは Roblox によって開発され、MIT ライセンスの下でリリースされています。

この言語は C++ で書かれています。WebAssembly にコンパイルして Pyodide の内部で実行可能であることはすでに知っていましたので、Codex と GPT-5.5 xhigh を使って、私の実験をパッケージ化し、GitHub Actions を利用して PyPI へ公開するタスクを任せてみました。

いくつかの試行錯誤を経て、最終的な結果がこちらです:luau-wasm は、Pyodide で以下のように使用できる、276KB の luau_wasm-0.1a0-cp314-cp314-pyemscripten_2026_0_wasm32.whl ファイルを公開する、全く新しい PyPI パッケージです。

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

for i, name in animals do print(i .. ". " .. name .. " (" .. #name .. ")") end

'''))

このコードは、Pyodide REPL デモ で実行して動作を確認できます。

luau-wasm の GitHub リポジトリ には、ビルドおよびデプロイ用のスクリプト(最新の cibuildwheel を使用)がすべて含まれており、Pyodide を読み込んで luau-wasm をインストールし、試すためのインターフェースを提供する HTML デモページもデプロイされています:https://simonw.github.io/luau-wasm/

image
image

現在、このプラットフォーム向けにウェルを公開しているパッケージはどれくらいあるのでしょうか?

私は、現在どのくらいの数のパッケージがこのプラットフォーム向けにウェル(wheel)を公開しているのか気になりました。

ChatGPT でいくつか試行錯誤した結果、PyPI の BigQuery 上の公開データセット を対象に実行できる この BigQuery SQL にたどり着きました。クエリ結果の 生 JSON と、最新アップロード日に基づいてパッケージを重複排除する SQLite SQL クエリが Datasette Lite 上で動作しています。

クエリが正しければ、現在 28 の PyPI パッケージが新しい pyemscripten_202*_wasm32 タグを使用して公開されています。

luau-wasm、uuid7-rs、cmm-16bit、pyOpenTTDAdmin、imgui-bundle、numbertoolkit、bashkit、geoarrow-rust-core、arro3-io、arro3-core、arro3-compute、onnx、powerfit-em、tcod、chonkie-core、tokie、robotraconteur、pydantic_core、yaml-rs、cadquery-ocp-novtk-OCP.wasm、uuid_utils、base64_utils、pycdfpp、lib3mf-OCP.wasm、typst、toml-rs、onnx-weekly、dummy-pyodide-ext-test

Pyodide で使用するために WASM ウィールを PyPI に公開する(続き 5/6)

今後数ヶ月から数年の間に、これらが増えることを願っています。

Tags: lua, pypi, python, sandboxing, webassembly, github-actions, pyodide

原文を表示

The Pyodide 314.0 release announcement (via Hacker News) includes news I've been looking forward to for a long time:

You can now publish Python packages built for Pyodide (or any Python runtime compatible with the PyEmscripten platform defined in PEP 783) directly to PyPI and install them at runtime.

Previously, the Pyodide maintainers had to maintain, build, and host over 300 packages ourselves. This created a significant burden on our maintainers and became a major bottleneck for the community, as every new package required manual review.

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.

Here's the PR to PyPI itself supporting this, which landed on April 21st.

I adore Pyodide, and have been frustrated in the past by this limitation. It's possible to compile C or Rust extensions to WASM in a wheel file, but before now there was no easy way to distribute them.

Thanks to the efforts of a whole lot of people, that's now been fixed!

Trying it out with luau-wasm

I decided to celebrate by finding something I could package. I have quite a few experimental Pyodide projects lying around, but the best fit for this looked to be my Luau WebAssembly research spike from 9th March.

Luau is a "small, fast, and embeddable programming language based on Lua with a gradual type system", developed by Roblox and released under an MIT license.

It's written in C++. I already knew it was possible to compile it to WebAssembly and get it running inside of Pyodide, so I set Codex + GPT-5.5 xhigh the task of packaging my experiment up and publishing it to PyPI using GitHub Actions.

It took some iteration, but here's the result: luau-wasm is a brand new PyPI package which publishes a 276KB luau_wasm-0.1a0-cp314-cp314-pyemscripten_2026_0_wasm32.whl file which can be used in Pyodide like this:

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 
for i, name in animals do print(i .. ". " .. name .. " (" .. #name .. ")") end
'''))

You can run that code in the Pyodide REPL demo to see it in action.

The GitHub repo for luau-wasm includes all of the build and deploy scripts (using the latest cibuildwheel) and also deploys an HTML demo page which loads Pyodide, installs luau-wasm and provides an interface for trying it out: https://simonw.github.io/luau-wasm/

Screenshot of a web app titled
Screenshot of a web app titled

How many packages are using this so far?

I was curious to see how many packages are currently publishing wheels for this platform.

After some tinkering with ChatGPT I got to this BigQuery SQL which I ran against PyPI's public dataset on BigQuery. Here's the raw JSON of query results and here's a SQLite SQL query in Datasette Lite which dedupes packages by most recent upload date.

If the query is right, there are currently 28 PyPI packages publishing with the new pyemscripten_202*_wasm32 tags:

luau-wasm, uuid7-rs, cmm-16bit, pyOpenTTDAdmin, imgui-bundle, numbertoolkit, bashkit, geoarrow-rust-core, arro3-io, arro3-core, arro3-compute, onnx, powerfit-em, tcod, chonkie-core, tokie, robotraconteur, pydantic_core, yaml-rs, cadquery-ocp-novtk-OCP.wasm, uuid_utils, base64_utils, pycdfpp, lib3mf-OCP.wasm, typst, toml-rs, onnx-weekly, dummy-pyodide-ext-test

Here's hoping we see a whole lot more of those showing up over the coming months and years.

Tags: lua, pypi, python, sandboxing, webassembly, github-actions, pyodide

この記事をシェア

関連記事

Simon Willison Blog★32026年6月6日 12:53

MicroPython と WASM を用いたサンドボックス環境での Python コード実行

Simon Willison は、コード実行のサンドボックス環境を実現する新アルファパッケージ「micropython-wasm」を公開し、Datasette Agent のプラグインとして利用を開始した。

Simon Willison Blog★32026年5月31日 06:02

Pyodide とサービスワーカーを用いたブラウザ上での Python ASGI アプリの実行

Simon Willison は、WebAssembly の Pyodide とサービスワーカーを活用し、Datasette Lite をブラウザ上で完全に動作させる技術を実証した。

Simon Willison Blog★32026年3月3日 01:35

WebAssemblyとGifsicleを使用したGIF最適化ツール

著者がオンライン記事に含めるアニメーションGIFのファイルサイズを削減するために、WebAssemblyとGifsicleを組み合わせた最適化ツールを開発した。

今日のまとめ

AI日報で今日の重要ニュースをまとめ読み

ニュース一覧に戻る元記事を読む