Stream: SIG-Guest-Languages

Topic: Linking against prebuild wasi python


view this post on Zulip Ramon Klass (Oct 06 2023 at 16:32):

Brett Cannon said:

CPython 3.12.0 WASI build https://github.com/brettcannon/cpython-wasi-build/releases/tag/v3.12.0

any help on how I can link this so my pyo3 application compiles to wasi? I want to embed the libpython version

view this post on Zulip Joel Dice (Oct 06 2023 at 16:50):

The build process is a bit complicated, but componentize-py's runtime subcrate uses PyO3 and libpython3.11.so (which itself requires a patched version of wasi-sdk/wasi-libc, so maybe not the best example at the moment). The other thing to look at is https://github.com/fermyon/spin-python-sdk, which uses PyO3, libpython3.11.a and a stock wasi-sdk/wasi-libc.

Contribute to bytecodealliance/componentize-py development by creating an account on GitHub.
Experimental Spin Python SDK. Contribute to fermyon/spin-python-sdk development by creating an account on GitHub.

view this post on Zulip Ramon Klass (Oct 06 2023 at 16:52):

I just realized pyo3 has no abi3-py312 yet anyway

view this post on Zulip Joel Dice (Oct 06 2023 at 16:52):

yeah, might need to wait for that


Last updated: Nov 22 2024 at 16:03 UTC