sagemathinc / cowasm

CoWasm: Collaborative WebAssembly for Servers and Browsers. Built using Zig. Supports Python with extension modules, including numpy.

Home Page:https://cowasm.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

start sagemath port

williamstein opened this issue · comments

This will be something to do once (or if) numpy builds and works using zig. I say "or if", since it's not guaranteed this will ever happen, e.g., my current status is llvm segfaulting.

In any case, "start the sagemath port" is really something that would happen in a new repo, and is about building important dependencies of sage, e.g., like I started in https://github.com/sagemathinc/jsage (pari, gmp, etc.). The architecture will be:

  1. python-wasm -- this repo -- really just a way to build CPython+dylink support for WASM in the browser and node using zig+node.js. This is just the small core which is why this has a very boring name. It's just yet another build of cpython and a tiny bit more.
  2. unknown name, maybe scientific-python-wasm -- will be a new repo with non-core scientific packages (cython, sympy, numpy, etc.), and a similar scope to pyodide. This will depend on 1.
  3. unknown name, maybe sage-python-wasm -- we be yet another repo dedicated to building packages for wasm that are needed for sagemath. A relevant trac ticket is here: https://trac.sagemath.org/ticket/34539

We have numpy and much more at this point, including Cython. So it's easy to move forward.

The way I'm going to do this is by creating a new folder "sagemath", next to the "core", "python", etc. folders. It'll be clearly marked via the README as having code in it with GPL licenses, and also we'll make it clear nothing in core & python depend on sagemath.

The obvious first packages would be GMP, FLIINT and pari, since I already ported that last year as part of jsage.

And so it begins: afdf52b