vmware-labs / webassembly-language-runtimes

Wasm Language Runtimes provides popular language runtimes (Ruby, Python, …) precompiled to WebAssembly that are tested for compatibility and kept up to date when new versions of upstream languages are released
Apache License 2.0
327 stars 27 forks source link

Build and publish libpython as part of the python releases #83

Closed assambar closed 1 year ago

assambar commented 1 year ago

Here's a sample release - https://github.com/assambar/webassembly-language-runtimes/releases/tag/python%2F3.11.1%2B20230324-44af818

Note that the pkg-config includes LDFLAGS for appropriate stack size and positioning to avoid frequent issues with stackoverflows

$$ cat build-output/python/v3.11.1/lib/wasm32-wasi/pkg-config/libpython3.11.pc

prefix=
exec_prefix=${prefix}
libdir=${prefix}/lib/wasm32-wasi
includedir=${prefix}/include

Name: libpython3.11
Description: libpython3.11 allows embedding the CPython interpreter
Version: 3.11.1
Libs: -L${libdir} -Wl,-z,stack-size=524288 -Wl,--stack-first -Wl,--initial-memory=10485760
Cflags: -I${includedir}

image

Fixes issue #71