3 ms·
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 comp
by robertlagrant 4y ago
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?
- angelmm 4y agoHey! 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. [1] https://github.com/kateinoigakukun/wasi-vfs https://github.com/kateinoigakukun/wasi-vfs
- robertlagrant 4y agoVery cool. We ship some Python as a Debian dependency and so this could become a really interesting way to package everything up.
- seddonm1 4y agoI have been following and playing with this repository: https://github.com/singlestore-labs/python-wasi/ 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
- ridruejo 4y agoYes! Single store is a great team. We are currently using some of their work for this Python release, like libz