wasmer-python
wasmtime-py
Our great sponsors
wasmer-python | wasmtime-py | |
---|---|---|
13 | 3 | |
1,955 | 363 | |
1.2% | 3.9% | |
6.1 | 7.5 | |
8 months ago | 6 days ago | |
Rust | Python | |
MIT License | 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.
wasmer-python
-
WebAssembly: byte-code of the future
It's also possible to do this from many other languages. For example rust, ruby, python or from the CLI.
-
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
- Back-end languages are coming to the front-end
-
Running python in a browser (no sever)
Well... not with that attitude.
-
WAGI: WebAssembly Gateway Interface
Not just for web either: if you ship WebAssembly bytecode as part of your python package, you can push your platform dependencies out to a wasm runtime and skip most of the build matrix.
A runtime like wasmer-python [0] is only 1.5MB.
[0]: https://github.com/wasmerio/wasmer-python
- Wasmer Python
- Lona - A web framework for responsive web apps in full python
- What do you guys think of Dominate? Use cases?
- Can you convert python to JavaScript with libraries?
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?
streamlit - Streamlit — A faster way to build and share data apps.
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.
reactpy - It's React, but in Python
python-wasi - Utilities for building CPython for the WASI platform
wagi - Write HTTP handlers in WebAssembly with a minimal amount of work
pywasm3 - Python bindings for Wasm3, a fast WebAssembly interpreter and the most universal WASM runtime
aiohttp-json-rpc - Implements JSON-RPC 2.0 using aiohttp
empack - Tools to pack a conda / mamba environment into a JS & WASM bundle
wasi-experimental-http - Experimental outbound HTTP support for WebAssembly and WASI
extism - The framework for building with WebAssembly (wasm). Easily load wasm modules, move data, call functions, and build extensible apps.
dominate - Dominate is a Python library for creating and manipulating HTML documents using an elegant DOM API. It allows you to write HTML pages in pure Python very concisely, which eliminate the need to learn another template language, and to take advantage of the more powerful features of Python.
python-sandbox-wasm