Skip to content

[WIP] Build JupyterLab extensions with Rspack (Rust powered Webpack)

Notifications You must be signed in to change notification settings

jtpio/jupyterlab-rspack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JupyterLab Rspack

npm

Warning

This is still a work in progress

Build JupyterLab extensions with Rspack (Rust powered Webpack).

jupyterlab-rspack-preview-3.webm

Install

With npm:

npm i --save-dev jupyterlab-rspack

With pnpm:

pnpm i --save-dev jupyterlab-rspack

With yarn:

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: jupyterlab/jupyterlab#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.

About

[WIP] Build JupyterLab extensions with Rspack (Rust powered Webpack)

Resources

Stars

Watchers

Forks

Packages

No packages published