Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use WASM commands #6

Merged
merged 1 commit into from
Jul 4, 2024
Merged

Use WASM commands #6

merged 1 commit into from
Jul 4, 2024

Conversation

ianthomas23
Copy link
Member

This PR uses WebAssembly commands rather than TypeScript ones. It follows on from the experiment in jupyterlite/terminal#15 by moving the WASM modules from there to here. There are 2 WASM modules, fs.js contains the Emscripten filesystem used by the commands and a single instance exists for the duration of the shell, and coreutils.js contains many commands. The latter is reused for each command run and the filesystem from fs.js is patched in as a PROXYFS so that all commands see the same filesystem. There is no use of a JupyterLite DriveFS here, that is kept in the terminal extension as it can only be used with a running instance of JupyterLite and here we want to be able to test the commands just using the basic WASM filesystem. There are also some builtin commands (currently only cd) that access the Emscripten filesystem directly.

The idea here is to merge this and release version 0.0.4 of @jupyterlite/cockle, then jupyterlite/terminal#15 can be rewritten to use this. After that we can do some fast iterations of cockle without having to change terminal, to try to get this into a fully working system.

@ianthomas23 ianthomas23 added the enhancement New feature or request label Jul 4, 2024
@ianthomas23 ianthomas23 merged commit da2f773 into main Jul 4, 2024
3 of 4 checks passed
@ianthomas23 ianthomas23 deleted the wasm-commands branch July 4, 2024 12:33
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we will probably want to exclude these files from the repo at some point, and generate them automatically during the build process?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, although the details of all that are areas for current investigation. I am hoping that we can have a set of default tools plus some optional ones (e.g. biosciences toolkit) all on emscripten-forge, and modify the jupyter lite build process to do whatever is required for the terminal extension to make use of them. But I don't yet understand if or how that might work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants