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

Obtain wasm packages from emscripten-forge when building deployment #61

Merged
merged 3 commits into from
Oct 7, 2024

Conversation

ianthomas23
Copy link
Member

This PR changes the configuration and packaging of wasm command files to occur when building a deployment (static website) rather than being hard-coded in the cockle source code and the wasm files being packed in the NPM package. The process is similar to that performed for python xeus kernels in JupyterLite except that the code here is TypeScript rather than Python. There is an input JSON file config-cockle-base.json containing configuration for compulsory wasm packages (cockle_fs, coreutils and grep) which ships with cockle, and this can be added with an extra config file to add optional wasm packages such as lua. A JSON config file is placed alongside the wasm files when a deployment is created, and ShellImpl reads this config file to configure the various WasmCommandRunner objects.

Probably lots of the internal details will change. The JSON file formats should be in schemas, and the prepare_wasm node tool script should be more robust. It would be simpler for end-users if instead of using a bespoke JSON file a normal micromamba environment file could be used (as with python xeus), but for this we would need some other way to also configure which emscripten-forge packages contain which wasm modules and which commands. These could probably be embedded in the emscripten-forge packages in some way.

After merging this will need a new cockle release before it can be tried out in JupyterLite.

@ianthomas23 ianthomas23 added the enhancement New feature or request label Oct 7, 2024
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.

1 participant