Re:WebAssembly: Adding Python Support to WASM Language Runtimes
by robertlagrant on Tuesday January 31, 2023 @01:30PM
(#34599488)
The non-Docker version seems to require an external site-packages, unless I missed it. Is it possible to produce a single wasm binary with all dependencies compiled in?
[ Parent
| on HN ]
Re:WebAssembly: Adding Python Support to WASM Language Runtimes
by angelmm on Tuesday January 31, 2023 @02:36PM
(#34600628)
Hey! Dev here :)
For external libraries, it requires you to mount the libraries with WASI when running the python.wasm module. Another option we're exploring is to use wasi-vfs[1] to include some common modules in our pre-built binaries. For example, Ruby does require some extra libraries for common workloads (like JSON parsing). This is still on the exploration phase, but we may do something with it.
Re:WebAssembly: Adding Python Support to WASM Language Runtimes
by robertlagrant on Tuesday January 31, 2023 @03:24PM
(#34601398)
Very cool. We ship some Python as a Debian dependency and so this could become a really interesting way to package everything up.
Re:WebAssembly: Adding Python Support to WASM Language Runtimes
by seddonm1 on Tuesday January 31, 2023 @02:46PM
(#34600813)
I have been following and playing with this repository: https://github.com/singlestore-labs/python-wasi/
It builds a single Python WASM module with all dependencies included (they use VFS) and a Dockerfile to make the process easy (and actually worked first go). It does produce large files though: wasi-python3.11.wasm 110MB