Skip to content

0.12.1

Choose a tag to compare

@decitre decitre released this 07 Nov 14:37
· 85 commits to main since this release

No library code changes since 0.12.0. The hosted JupyterLite sites now run a newer xeus-python kernel, which works on cross-origin isolated pages.

xeus-python sites can now be served cross-origin isolated

The 0.11.1 and 0.12.0 docs said not to serve the xeus-python site with COOP/COEP headers, because its kernel failed to start (jupyterlite/xeus#378). The sites are now built with jl-forge 0.6.0, whose xeus-python environment comes from the emscripten-forge 4x channel and includes the upstream fix (pyjs 4.1.0):

before now
xeus 5.2.8 6.0.6
xeus-python 0.17.8 0.19.0
pyjs 3.2.0 4.1.0
emscripten 3.1.73 4.0.9

On the xeus site, isolation now gives the same speedup as on the Pyodide site: all-MiniLM-L6-v2 fp16 on a long input goes from about 137 ms to 50 ms (2.5 to 2.8×) in Chromium, Firefox and WebKit. As on the Pyodide site, WebKit ignores credentialless and needs require-corp to be isolated. Measurements are in docs/NATIVE.md, "Browser latency".

  • Action: if you self-host a xeus-python site behind COOP/COEP headers, rebuild it with scripts/lite-build.sh (or jl-forge 0.6.0 or later). Sites built with an older xeus-python environment still crash when isolated.
  • GitHub Pages: the hosted demo sites cannot set response headers, so they still run single-threaded.
  • Not yet tested: the isolated xeus site in Safari itself (only Playwright's WebKit).

Development

  • scripts/lite-build.sh pins jl-forge~=0.6.0. Its first build solves a new xeus environment, because the cache key includes the channel.
  • tests/browser/test_tokenizer_xeus.py uses the emscripten-forge 4x channel, so it tests the kernel the sites ship.