Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can you build an emscripten wheel to support pyodide runtime? #151

Open
CNSeniorious000 opened this issue Oct 8, 2024 · 1 comment
Open

Comments

@CNSeniorious000
Copy link

Background

Pyodide is a wasm build of CPython, which support loading 3rd-party packages with pure-python wheels or emscripten wheels.

Some packages I want to use in pyodide depends on jiter (for example, openai), blocking me from installing them. So it woould be great if you can build an emscripten wheel for pyodide.

Related


Personally I am not good at rust or emscripten so I may not be able to help, but here are some docs about how to build one in pyodide. As pydantic had a pyodide wheel since a long time ago, I think it won't be difficult to build one for jiter.

https://pyodide.org/en/stable/development/new-packages.html#rust-pyo3-packages

@narumichiaki
Copy link

narumichiaki commented Nov 8, 2024

py.cafe explains how to build jiter into wheel, and and this method worked fine for me. To use jiter's wheel with Pyodide, it seems that the version of Emscripten used to compile jiter must be the same as the one used to compile Pyodide.
https://py.cafe/docs/howto/build
I will also share the Dockerfile I used to compile it.
https://gist.github.com/narumichiaki/0cb32c5b6db64493d19066a9ca3aeccb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants