Tool to package Python applications as WebAssembly components
Project description
componentize-py
This is a prototype of a tool to convert a Python application to a WebAssembly component. It takes the following as input:
- a WIT file or directory
- the name of a WIT world defined in the above file or directory
- the name of a Python module which targets said world
- a list of directories in which to find the Python module and its dependencies
The output is a component which may be run using
e.g. wasmtime
. See the
tests for examples.
Build Prerequisites
- WASI SDK v16 (later versions may work, but have not yet been tested)
- Install this to
/opt/wasi-sdk
, or else specify an alternative location via theWASI_SDK_PATH
environment variable
- Install this to
- Tools needed to build CPython (e.g. Make, Clang, etc.)
- Rust v1.68 or later, including the
wasm32-wasi
andwasm32-unknown-unkown
targets
Building and Running
cargo run --release -- --help
Running Tests
The tests live in a separate crate due to an incompatibility between the version
of wasmtime
which wizer
uses and the one we use to test.
(cd test && cargo test --release)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
componentize_py-0.1.0.tar.gz
(26.6 MB
view hashes)
Built Distributions
Close
Hashes for componentize_py-0.1.0-cp311-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8e56de0a73901dd918efbb39aef7395dbd37a6efca5839d8ffcf01711b8da74 |
|
MD5 | 21d9c5020f42673311041d1903f2bbba |
|
BLAKE2b-256 | a26843c49dd9ea229648ba2c2af5497c8508748910f14a3dc545327209224f88 |
Close
Hashes for componentize_py-0.1.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6de60c28d512a37412264128931373ddfb581ce97f3820ffdbbed2763a8628a3 |
|
MD5 | f66de9c2d2efb190733f893311b58fed |
|
BLAKE2b-256 | 947efe3626a6fe5b0a4b4b2d170ba96955c20a2ffbf0802f1214452123685f0b |
Close
Hashes for componentize_py-0.1.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | da9bed88a78d1865938733c535f7bfabb392f6ead3688b2ce4c45405c9f90388 |
|
MD5 | 37ca158f9c2e0c71cb5ad86ed49d528b |
|
BLAKE2b-256 | 78507f5ee30f035af30f5f429892e19919559bec119a4aba154ea254ee029971 |
Close
Hashes for componentize_py-0.1.0-cp311-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 691156e47231eedd46ff99c8acba085ee2bcf230e073ad4c79ce5751a7cb621a |
|
MD5 | a2b66ea6a7f76927cef77f8de03b7876 |
|
BLAKE2b-256 | 2121f3c1f897a1fe784e57d7e08848137dd9dbe810d2250e790b9abd59cab6cd |
Close
Hashes for componentize_py-0.1.0-cp311-abi3-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62ea777b22899ca2f63cf764052f492074cbf5f21adfc1bba7b009b44160ca14 |
|
MD5 | e98ccc608de300cdb24d2f78020d5b95 |
|
BLAKE2b-256 | 0e73e8d054882dd540482ede71fa6fb7353c12d9701fc04fb132f5ad99319b29 |