-
-
Notifications
You must be signed in to change notification settings - Fork 641
Description
The modularization effort (#29705) makes it easy to port and deploy portions of Sage to new platforms. Here we target Web Asssembly (wasm). This enables integration with Javascript in the browser, interactive online documentation, etc.
- https://jupyterlite-sphinx.readthedocs.io/en/latest/directives/replite.html
- https://live.sympy.org/ (https://github.com/sympy/live, based on https://github.com/jupyterlite/demo)
- https://github.com/jupyterlite/pyodide-kernel/tree/main
Porting to Pyodide
-
Nothing needs to be done for platform-independent wheels available on PyPI. When needed as deps for other packages on pyodide, package metadata can be added easily using
pyodide skeleton pypi
. -
GH Actions: Build platform-independent wheels of sagemath-environment, sage-setup, sage-sws2rst for PyPI #37099: Platform-independent wheels for pure Python distribution packages sagemath-environment, sage-setup, sage-docbuild. (Currently we only publish sdists, but micropip needs wheels.)
-
Cross references for non-Python packages that are already available in Pyodide: build/pkgs/*/distros/pyodide.txt: New, corresponding to pyodide 0.25.0 #37120
-
Non-Python packages that are not available yet need to be added, as documented at https://pyodide.org/en/stable/development/new-packages.html#c-library-dependencies
- Update libgmp to 6.3.0, libmpfr to 4.2.1, libmpc to 1.3.1 pyodide/pyodide#4406
- New packages ppl, pplpy (Parma polyhedra library), cysignals pyodide/pyodide#4407
- New packages
flint
,python-flint
pyodide/pyodide#4410 - Add package
pari
pyodide/pyodide#4430 - New packages
e_antic
,normaliz
,pynormaliz
pyodide/pyodide#4439
-
Platform wheels already available in Pyodide:
-
Platform wheels can be added to Pyodide
-
Alternatively, platform wheels can be built "out of (the Pyodide) tree"
- pyodide-build, Emscripten SDK #37121
pyodide_build.out_of_tree.venv
: Monkey-patchplatform.system
for pip pyodide/pyodide#4400- Needed for sagemath-objects, sagemath-categories: Have
gmpy2
, needcysignals
; are gmp headers available in out of tree builds?
-
Candidate for the first useful package: sagemath-polyhedra (Modularization of sagelib: Break out a separate package sagemath-polyhedra #32432)
Other technologies
- https://github.com/emscripten-forge/recipes
- https://jupyterlite.readthedocs.io/en/latest/howto/configure/kernels.html#jupyterlite-xeus-python
CC: @williamstein
Component: porting
Issue created by migration from https://trac.sagemath.org/ticket/34539