https://github.com/jtpio/jupyterlab-rspack
[WIP] Build JupyterLab extensions with Rspack (Rust powered Webpack)
https://github.com/jtpio/jupyterlab-rspack
Last synced: about 1 year ago
JSON representation
[WIP] Build JupyterLab extensions with Rspack (Rust powered Webpack)
- Host: GitHub
- URL: https://github.com/jtpio/jupyterlab-rspack
- Owner: jtpio
- Created: 2024-03-04T09:40:50.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-20T07:29:28.000Z (over 2 years ago)
- Last Synced: 2025-02-28T22:35:20.670Z (over 1 year ago)
- Language: TypeScript
- Size: 55.7 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JupyterLab Rspack
[](https://www.npmjs.com/package/jupyterlab-rspack)
> [!WARNING]
> This is still a work in progress
Build JupyterLab extensions with Rspack (Rust powered Webpack).
[jupyterlab-rspack-preview-3.webm](https://github.com/jtpio/jupyterlab-rspack/assets/591645/fae85289-7062-4729-9b19-2ea0a0cd40cd)
## Install
With `npm`:
```bash
npm i --save-dev jupyterlab-rspack
```
With `pnpm`:
```bash
pnpm i --save-dev jupyterlab-rspack
```
With `yarn`:
```bash
yarn add --dev jupyterlab-rspack
```
## Usage
If you created your extension from the JupyterLab extension template (https://github.com/jupyterlab/extension-template), replace the `jupyter labextension build` command with `jupyterlab-rspack`.
You will need JupyterLab to be installed. We recommend creating a new virtual environment and installing JupyterLab with `pip` or `conda`. `jupyterlab-rspack` will look for JupyterLab to be installed in the environment, to properly populate the list of `shared` modules when building the extension.
> [!WARNING]
> Some features might still be missing, please check the list of open issues to know more
## Context
`rspack` is a Rust powered alternative to Webpack. It also supports Module Federation, which is used by the JupyterLab extension system.
This means it is possible to use `rspack` for building extensions, while JupyterLab still uses `webpack` internally.
For reference the switch to `rspack` is also being discussed in this issue: https://github.com/jupyterlab/jupyterlab/issues/15035
## Future work
This package was created to more easily test building third-party extensions with Rspack, without having to change the existing JupyterLab build system.
In the coming weeks, we will be looking into integrating this in JupyterLab core directly, so building with Rspack becomes the default.