From 8aa6819b01a62fc13d6b713a165575f766fc8d27 Mon Sep 17 00:00:00 2001 From: Ivan Carvalho Date: Sun, 21 Jun 2026 23:23:05 -0400 Subject: [PATCH 1/2] Publish experimental wheels for Pyodide --- .github/workflows/wheels.yml | 40 +++++++++++++++++++ docs/source/install.rst | 2 +- .../pyodide-pypi-wheels-06f63330094bac2b.yaml | 7 ++++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/pyodide-pypi-wheels-06f63330094bac2b.yaml diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 6f001569d9..20c7c5f580 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -176,6 +176,46 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: packages-dir: wheelhouse/ + build_emscripten: + name: Build wheels for Pyodide (Emscripten) + runs-on: ubuntu-latest + environment: release + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + name: Install Python + with: + python-version: '3.12' + - uses: dtolnay/rust-toolchain@stable + - name: Install cibuildwheel + run: | + python -m pip install cibuildwheel==4.1.0 + - name: Build wheels + run: | + python -m cibuildwheel --platform pyodide --output-dir wheelhouse + env: + CIBW_BUILD: cp314-pyodide_wasm32 + CIBW_BUILD_VERBOSITY: 3 + - uses: actions/upload-artifact@v4 + with: + path: ./wheelhouse/*.whl + name: wheel-builds-emscripten + upload_emscripten: + name: Upload wheels for Pyodide (Emscripten) + runs-on: ubuntu-latest + environment: release + permissions: + id-token: write + needs: ["build_emscripten", "upload_shared_wheels"] + steps: + - uses: actions/download-artifact@v4 + with: + name: wheel-builds-emscripten + path: wheelhouse + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: wheelhouse/ build-win32-wheels: name: Build wheels on win32 runs-on: windows-latest diff --git a/docs/source/install.rst b/docs/source/install.rst index 071f25e347..2b9cc619d8 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -176,7 +176,7 @@ Tier Experimental ----------------- Tier Experimental platforms are not tested upstream as part of the development process. -Pre-compiled binaries are built by the external community in separate repositories. Not all of rustworkx might compile for +Pre-compiled binaries are built and published to PyPI as part of the release process. Not all of rustworkx might compile for platforms of this tier and features can be removed. Often, platforms in this tier use unstable features from the Rust compiler and might break at any time. Support for these platforms are best effort only. diff --git a/releasenotes/notes/pyodide-pypi-wheels-06f63330094bac2b.yaml b/releasenotes/notes/pyodide-pypi-wheels-06f63330094bac2b.yaml new file mode 100644 index 0000000000..175ce13111 --- /dev/null +++ b/releasenotes/notes/pyodide-pypi-wheels-06f63330094bac2b.yaml @@ -0,0 +1,7 @@ +--- +features: + - | + Experimental Pyodide wheels are now published to PyPI. These wheels use the + ``pyemscripten`` platform tag defined by `PEP 783 `__, + allowing compatible Pyodide environments to install ``rustworkx`` from PyPI. + Pyodide support remains best effort. From 9a3e9e1fd84cb398f2d14e7864d0aa21e169a695 Mon Sep 17 00:00:00 2001 From: Ivan Carvalho Date: Sun, 21 Jun 2026 23:39:58 -0400 Subject: [PATCH 2/2] Install Emscripten Rust target for wheel builds --- .github/workflows/wheels.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 20c7c5f580..f538a0ecd7 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -187,6 +187,9 @@ jobs: with: python-version: '3.12' - uses: dtolnay/rust-toolchain@stable + with: + targets: wasm32-unknown-emscripten + components: rust-src - name: Install cibuildwheel run: | python -m pip install cibuildwheel==4.1.0