Logbook + Scratchpad

webassembly

While reading the docs on VoilĂ , I've come across Voici, then JupyterLite, and finally Pyodide.

Each projects has its own merits:

  • Voici aims to make it easy to build a static Web application from a Jupyter notebook, meaning that a dashboard can be built and deployed without a running Python environment.
  • JupyterLite is a Web-native version of JupyterLab, meaning that it is designed to run entirely in the browser without a Python environment.
  • Pyodide is a Python distribution based on WebAssembly, meaning it is also designed to run entirely in the browser as a Python environment; in fact, it provides a base for a browser-based kernel that JupyterLite uses.

I've tried Voici right after trying out VoilĂ , but I couldn't manage to make it run because of bugs I didn't have time to investigate; I'll try again later on. I haven't tried JupyterLite as such yet, but I did try Pyodide and, at a first sight, it really looks powerful. With Pyodide you can run Python code and use external packages in a Web page: how cool is that?

I was thinking of something like Pyodide when I first read about a WebGL port of Panda3D based on Emscripten (a compiler that supports compiling a host of languages into WebAssembly, which Pyodide actually uses), and then I found it by coincidence serendipity! Full example of integration with JavaScript coming soon.

#TIL #tech #python #webassembly