Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 0 additions & 79 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -484,82 +484,3 @@ K. He, R. Newbury, T. Tran, J. Haviland, B. Burgess-Limerick, D. Kulić, P. Cork
<img src="https://raw.githubusercontent.com/petercorke/robotics-toolbox-python/main/docs/figs/mmc_youtube.png" width="560">
</a>
</p>

<br>

## Build a JupyterLite/Pyodide Wasm wheel

[Pyodide](https://pyodide.org/) is a full CPython distribution compiled to
WebAssembly, which is what lets the "Try it Now" JupyterLite deployment above
run this toolbox entirely client-side, no server required. Each Pyodide
release embeds one specific CPython version, and a wasm wheel is tagged with
the CPython version it was built for (`cp312`, `cp313`, ...) -— a wheel only
loads if its tag matches the CPython embedded in the Pyodide runtime actually
running. JupyterLite doesn't bundle Pyodide directly either: the
`jupyterlite-pyodide-kernel` package pulls in a specific Pyodide version per
its own release, so bumping that one package can silently change which wheel
tag your deployment now needs -— this is the single sharpest edge in this
whole pipeline. This repo's live deployment currently pins
`jupyterlite-pyodide-kernel==0.6.1` (see `.github/workflows/ci.yml`), which
embeds Pyodide 0.27.6 / CPython 3.12 — hence `cp312` below.

Also note Pyodide's own version numbering changed in 2026: releases up to
`0.29.x` used an independent `0.x` scheme, but from Pyodide `314.0.0` onward
the version number tracks the embedded CPython version directly (`314` =
Python 3.14). "Current" no longer means a `0.x` version.

### Use the published wheel (recommended)

PyPI rejects the `pyodide_*` platform tag, so Wasm wheels can't be published
there -— instead, every GitHub release attaches ready-built wheels (for each
supported CPython version) as release assets. Download the one matching your
deployment's CPython version, e.g.:

```shell script
gh release download --repo petercorke/robotics-toolbox-python --pattern '*cp312*pyodide*'
```

This is exactly what `ci.yml`'s `docs-build` job does to populate the live
"Try it Now" site — most people should do this rather than building locally.

### Build locally

Only needed to test an unreleased change, or to target a different
CPython/Pyodide pin than the current release. Uses cibuildwheel's Pyodide
platform:

```shell script
make wheel-pyodide
```

Optionally pin the Pyodide runtime to match a different JupyterLite
deployment than this project's own:

```shell script
PYODIDE_VERSION=0.27.6 make wheel-pyodide
```

The target writes to `dist/` and runs `make wheel-pyodide-check`, which validates
the wheel filename contains:

- `cp312-cp312`
- `wasm32`
- `pyemscripten_<major>_<minor>` or `pyodide_<major>_<minor>`

To inspect the produced artifact path:

```shell script
ls -1 dist/*wasm32*.whl
```

### References

- [Pyodide release notes](https://github.com/pyodide/pyodide/releases) —
confirms what CPython version a given Pyodide tag embeds, including the
2026 versioning-scheme change.
- [jupyterlite-pyodide-kernel changelog](https://github.com/jupyterlite/pyodide-kernel/blob/main/CHANGELOG.md) —
the authoritative source for which Pyodide version a given kernel package
release bundles.
- [cibuildwheel Pyodide platform docs](https://cibuildwheel.pypa.io/en/stable/platforms/#pyodide-webassembly).

<br>
Loading