python-wasi
wasmtime-py
python-wasi | wasmtime-py | |
---|---|---|
1 | 3 | |
95 | 371 | |
- | 4.6% | |
2.4 | 7.6 | |
2 months ago | 7 days ago | |
C | Python | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
python-wasi
-
WebAssembly: Adding Python Support to WASM Language Runtimes
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
wasmtime-py
- another 4x to 5x speed up in calling #WASM #WebAssembly from python is on the horizon
-
WebAssembly: Adding Python Support to WASM Language Runtimes
Wasmtime's `wasmtime-py` embedding in python has support for Wasm Components: https://github.com/bytecodealliance/wasmtime-py#components (disclosure, I helped create it)
The remaining piece of the puzzle would be to create a wit-bindgen guest generator https://github.com/bytecodealliance/wit-bindgen#guests for this build of the python interpreter. You could then seamlessly call back and forth between the host and guest pythons, without even knowing that wasmtime is under the hood.
What are some alternatives?
nsjail - A lightweight process isolation tool that utilizes Linux namespaces, cgroups, rlimits and seccomp-bpf syscall filters, leveraging the Kafel BPF language for enhanced security.
python-sandbox-wasm
pywasm3 - Python bindings for Wasm3, a fast WebAssembly interpreter and the most universal WASM runtime
empack - Tools to pack a conda / mamba environment into a JS & WASM bundle
wit-bindgen - A language binding generator for WebAssembly interface types
extism - The framework for building with WebAssembly (wasm). Easily load wasm modules, move data, call functions, and build extensible apps.
wasmer-python - 🐍🕸 WebAssembly runtime for Python
wasm-demos - some WASM demos