jupyterlite / cockle

In-browser bash-like shell implemented in TypeScript.
BSD 3-Clause "New" or "Revised" License
3 stars 2 forks source link

Prebuild worker bundle and import WASM files from same directory as JS wrappers #57

Closed ianthomas23 closed 1 month ago

ianthomas23 commented 1 month ago

These are changes required to ensure the latest code here works in the JupyterLite terminal. Changes are:

  1. Override WASM locateFile to load WASM files from the same directory as their JS wrapper files.
  2. Prebuilding the WebWorker bundle using rspack (webpack would also work).

Whilst doing item 1 I have also chosen to make the wasmBaseUrl option compulsory, as all existing uses set it anyway.

Item 2 is a temporary fix so that the WebWorker works OK in a JupyterLite deployment. It should, and eventually will, be in the terminal extension instead.

After this is merged I will release version 0.0.8 and make the corresponding changes in the terminal extension.