python-wasi
python-wasi | python-sandbox-wasm | |
---|---|---|
1 | 3 | |
91 | 20 | |
- | - | |
0.0 | 4.0 | |
about 1 year ago | 3 months ago | |
C | Python | |
Apache License 2.0 | MIT License |
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
python-sandbox-wasm
-
WebAssembly: Adding Python Support to WASM Language Runtimes
I've not yet figured out the incantations I need to actually do this - in particular the limits on CPU and memory time.
I posed this question on Mastodon recently and Jim Kring put together this demo, which gets most of the way there (albeit using an old Python 3.6 build): https://github.com/jimkring/python-sandbox-wasm
It doesn't feel like this should be as hard to figure out as it is!
- New Project: Call Untrusted Python Code from Python inside a Web Assembly “Sandbox”
What are some alternatives?
wasmtime-py - Python WebAssembly runtime powered by Wasmtime
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
wit-bindgen - A language binding generator for WebAssembly interface types
wasmer-python - 🐍🕸 WebAssembly runtime for Python
extism - The framework for building with WebAssembly (wasm). Easily load wasm modules, move data, call functions, and build extensible apps.