indygreg / indygreg/python-zstandard
Compiling `zstandard` to WebAssembly
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 642
- Forks
- 116
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 5
Description
Hi there! I am trying to package (in specific, add a recipe for) `zstandard` for [Pyodide](https://pyodide.org/), a Python distribution compiled using the [Emscripten toolchain](https://emscripten.org/) to [WebAssembly](https://webassembly.org/) that enables running Python code [in the browser](https://blog.pyodide.org/) and I thought that I should reach out here! Here is the link to the PR: https://github.com/pyodide/pyodide/pull/4792.
I see that the builds for `zstandard` are passing locally and the package builds in under half a minute. Would a package maintainer or core developer be willing to be added as a maintainer for this recipe? In any case, regardless, I would like to note that I would be happy to serve as a _de facto_ maintainer for this recipe and help out with upgrades to the package in Pyodide on new releases for it in PyPI with patches, tests, etc.
I would be happy to share further context around this: the reason is that [version 3](https://github.com/zarr-developers/zarr-python/pull/1583) of the [Zarr](https://zarr.dev/) Python package is going to use `zstandard` as a [required dependency](https://github.com/zarr-developers/zarr-python/pull/1903), and therefore wheels for `zstandard` for a `wasm32` platform tag (with the ABI and ABI tag managed by the available Emscripten version in Pyodide), which would be distributed through the [Pyodide CDN](https://www.jsdelivr.com/package/npm/pyodide) [across browsers](https://pyodide.org/en/stable/usage/index.html#supported-browsers) and handled by Pyodide's infrastructure and developer tooling for [building in-tree packages](https://pyodide.org/en/stable/development/new-packages.html) would be a wonderful addition towards bringing Zarr (and other dependents that might be using `zstandard`) to run on WASM-based platforms like [JupyterLite](https://jupyterlite.readthedocs.io/).
xref: here is the corresponding issue on the Pyodide repository that I opened a while ago: https://github.com/pyodide/pyodide/issues/4788
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Pyodide pull request and the Pyodide in-tree package build documentation mentioned in the issue. Review how the zstandard recipe builds with the Emscripten toolchain and how its tests are run. Done means the recipe is accepted for Pyodide and a maintainer or de facto maintainer is identified for future upgrades.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, python, wasm
- Domain
- build-system, devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100