wasmtime-py
python-wasi
wasmtime-py | python-wasi | |
---|---|---|
3 | 1 | |
366 | 91 | |
3.3% | - | |
7.6 | 0.0 | |
4 days ago | about 1 year ago | |
Python | C | |
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.
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.
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
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.
pywasm3 - Python bindings for Wasm3, a fast WebAssembly interpreter and the most universal WASM runtime
python-sandbox-wasm
empack - Tools to pack a conda / mamba environment into a JS & WASM bundle
extism - The framework for building with WebAssembly (wasm). Easily load wasm modules, move data, call functions, and build extensible apps.
wit-bindgen - A language binding generator for WebAssembly interface types
wasmer-python - 🐍🕸 WebAssembly runtime for Python
wasm-demos - some WASM demos