pywasm3

pywasm3 | python-sandbox-wasm | |
---|---|---|
3 | 3 | |
83 | 25 | |
- | - | |
1.3 | 4.0 | |
6 months ago | 12 months ago | |
C | Python | |
MIT License | 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.
pywasm3
-
New package: wasm.el
It's an embedding of the wasm3 library, and it exposes a function, `wasm-test`, that can call a function without arguments from a simple WebAssembly module. I intend to update it to reach feature parity with, for example, the python embedding.
-
WebAssembly: Adding Python Support to WASM Language Runtimes
PyOdide isn't currently supported outside of browsers, though that might change.
Either way, I couldn't figure out how to do the above sequence of steps with any of the available Python WASM runtimes - they're all very under-documented at the moment, sadly. I tried all three of these:
- https://github.com/wasmerio/wasmer-python
- https://github.com/bytecodealliance/wasmtime-py
- https://github.com/wasm3/pywasm3
-
Interpret Rust with Python
You might look at https://github.com/wasm3/pywasm3 . If nothing else, it’d presumably speed up your interpreter to have bindings to an established C based runtime rather than re implementing the runtime in python
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?
wasm-git - GIT for nodejs and the browser using https://libgit2.org compiled to WebAssembly with https://emscripten.org
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.
wasmtime-py - Python WebAssembly runtime powered by Wasmtime
python-wasi - Utilities for building CPython for the WASI platform
binjgb - Gameboy emulator implemented in C, that also runs in the browser
wasmer-python - 🐍🕸 WebAssembly runtime for Python
pywasm - A WebAssembly interpreter written in pure Python
wit-bindgen - A language binding generator for WebAssembly interface types
wasm.el - Emacs integration for WebAssembly runtimes. Currently working on wasm3.
extism - The framework for building with WebAssembly (wasm). Easily load wasm modules, move data, call functions, and build extensible apps.
