jupyterlite / xeus

JupyterLite loader for Xeus kernels
https://jupyterlite-xeus.readthedocs.io
BSD 3-Clause "New" or "Revised" License
21 stars 11 forks source link

Use `coincident` if `crossOriginIsolated`, `comlink` otherwise #102

Open jtpio opened 1 month ago

jtpio commented 1 month ago

Similar to https://github.com/jupyterlite/pyodide-kernel/pull/126

jupyterlite-xeus should use coincident if crossOriginIsolated, comlink otherwise, to fix the issue noticed in https://github.com/jupyterlite/jupyterlite/issues/1424.

As a follow-up to https://github.com/jupyterlite/xeus/pull/87

jtpio commented 1 month ago

Of note, coincident v2 was just released: https://github.com/WebReflection/coincident/releases/tag/v2.0.0

One of the changes is:

the "maybe available" SharedArrayBuffer issue has been fully solved via sabayon which guarantee functionality with or without special headers enabled and it allows people to provide their Service Worker as long as they add sabayon features

So maybe updating to the new version will remove the need for comlink (to be confirmed).

martinRenou commented 1 month ago

it allows people to provide their Service Worker

This is a red flag for me though. Regular async postMessage (what comlink does) should be enough.