Installation
To install wasmtime-py, run this command in your terminal:
$ pip install wasmtime
The package currently supports 64-bit builds of Python 3.9+ on Windows, macOS, and Linux, for x86_64 and arm64 architectures.
Versioning
wasmtime-py follows the Wasmtime versioning scheme, with a new major version being
released every month. As with Wasmtime itself, new major versions of wasmtime-py
can contain changes that break code written against the previous major version.
Since every installed Python package needs to agree on a single version of
wasmtime-py, to use the upper bound on the major version in the dependency
requirement should be bumped reguarly, ideally as soon as a new wasmtime-py
version is released. To automate this process it is possible to use
the whitequark/track-pypi-dependency-version script. YoWASP/runtime is
an example of a project that automatically publishes releases on PyPI once a new
version of wasmtime-py is released if it passes the testsuite.
Usage
In this example, we compile and instantiate a WebAssembly module and use it from Python:
from wasmtime import Store, Module, Instance, Func, FuncType
store = Store()
module = Module(store.engine, """
(module
(func $hello (import "" "hello"))
(func (export "run") (call $hello))
)
""")
def say_hello():
print("Hello from Python!")
hello = Func(store, FuncType([], []), say_hello)
instance = Instance(store, module, [hello])
run = instance.exports(store)["run"]
run(store)
Be sure to check out the examples directory, which has other usage patterns
as well as the full API documentation of the wasmtime-py package.
Components
Components are also supported in wasmtime-py. For more information see the
documentation of
wasmtime.component.
Using a component is similar to using core wasm modules, and for examples see
the tests/component/ directory.
Contributing
See CONTRIBUTING.md.
Release files for wasmtime 49.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| wasmtime-49.0.0.tar.gz | 129.6 kB | Details |
Built distributions (wheels)
Total release size: 98.3 MB
Release files / wasmtime-49.0.0.tar.gz
| Download URL | wasmtime-49.0.0.tar.gz |
|---|---|
| Size | 129.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fe0bf510ebdaf9432b756e320d2da2347f159e241f468c961b95164ab06cfdc1
|
|
BLAKE2b-256 checksum How to use checksums |
487eeb4b868529a2ae444cd24ea3c2cf1dd6dd2ce8d67ed4fb27b4e84529a1bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / wasmtime-49.0.0-py3-none-win_arm64.whl
| Download URL | wasmtime-49.0.0-py3-none-win_arm64.whl |
|---|---|
| Size | 7.2 MB |
| Tags | Python 3 Windows ARM64 |
|
SHA-256 checksum How to use checksums |
95ab8d3da870f38202f11c0933650cbdf014885335fcd407d6ae1a6b3d647599
|
|
BLAKE2b-256 checksum How to use checksums |
5dfe484658110d9b6ff54f4c16104f1313489432568a7eeb61b5bcf2c045a5ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / wasmtime-49.0.0-py3-none-win_amd64.whl
| Download URL | wasmtime-49.0.0-py3-none-win_amd64.whl |
|---|---|
| Size | 8.3 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
46a4e4220fd1bee45ad9c29a73cadad54373dad840eff104726490527bc7ef89
|
|
BLAKE2b-256 checksum How to use checksums |
c741b1d78d0ea1506abfa3005c8a50eee724b95a9cffbb2a0ed541f0965f5ab9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / wasmtime-49.0.0-py3-none-musllinux_1_2_x86_64.whl
| Download URL | wasmtime-49.0.0-py3-none-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 9.9 MB |
| Tags | Linux musl 1.2+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
7198903d53c63673acdbe4753594703d090842c4c9e050d2d4ff14ecfebed00f
|
|
BLAKE2b-256 checksum How to use checksums |
2db632cd30e1a38a06e01499aa50274a91b175a09b64754a06a0680e9881aa12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / wasmtime-49.0.0-py3-none-musllinux_1_2_aarch64.whl
| Download URL | wasmtime-49.0.0-py3-none-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 8.9 MB |
| Tags | Linux musl 1.2+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
8ab7e74c730bdda9613a8cd28b54aafa9e7f5d64aaff1a808751ccb142a76994
|
|
BLAKE2b-256 checksum How to use checksums |
d18bfb187eaed30738ce4b1f8ecdbb0be1b4c1750269ed63605286e253153329
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / wasmtime-49.0.0-py3-none-manylinux2014_aarch64.whl
| Download URL | wasmtime-49.0.0-py3-none-manylinux2014_aarch64.whl |
|---|---|
| Size | 8.9 MB |
| Tags | Linux glibc 2.17+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
263b924576d9519c43d5a1acff50a03ab03209d16d26c53543c9ab9a409fb93f
|
|
BLAKE2b-256 checksum How to use checksums |
9cf47889eb2fdbb11423e61f442af218441e0ae5749452bf8d2c1ade4ce630c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / wasmtime-49.0.0-py3-none-manylinux1_x86_64.whl
| Download URL | wasmtime-49.0.0-py3-none-manylinux1_x86_64.whl |
|---|---|
| Size | 9.9 MB |
| Tags | Linux glibc 2.5+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
94f0288f9e1c33924995a72bb769f4c4e2885002391589dd6992cdaa35d1990a
|
|
BLAKE2b-256 checksum How to use checksums |
6b49d62b41a6ae9063681bb6af018ff49b75d49f853bbf672c7ddebedf21d69e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / wasmtime-49.0.0-py3-none-macosx_11_0_arm64.whl
| Download URL | wasmtime-49.0.0-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 8.4 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
de98d6282c61d5dd4dc1ff1b410936ceb6fff3a27439e9cab51a375b8da2ec2f
|
|
BLAKE2b-256 checksum How to use checksums |
b7c12333bb9b9364c28b4d113853d4e002e6ee3ee8d87d33b413dfdb220ce4d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / wasmtime-49.0.0-py3-none-macosx_10_13_x86_64.whl
| Download URL | wasmtime-49.0.0-py3-none-macosx_10_13_x86_64.whl |
|---|---|
| Size | 9.5 MB |
| Tags | Python 3 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
839225359e01360974795bd7869c25d4305da96627df0af360b0668e20ecf1fb
|
|
BLAKE2b-256 checksum How to use checksums |
9f1b2595e986f3f283b2942c410d655917064e4e8126b082d354cb1dea4db2fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / wasmtime-49.0.0-py3-none-any.whl
| Download URL | wasmtime-49.0.0-py3-none-any.whl |
|---|---|
| Size | 8.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3afc071340d9bb0cdf0fc0213e670c6c06ac193f2d73caf9b92d928496e49a51
|
|
BLAKE2b-256 checksum How to use checksums |
173aff1b49ef5f66a2cfe6ff24eee44e092927fcc8e8374216fbd7de094320c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / wasmtime-49.0.0-py3-none-android_26_x86_64.whl
| Download URL | wasmtime-49.0.0-py3-none-android_26_x86_64.whl |
|---|---|
| Size | 9.9 MB |
| Tags | Android API level 26+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
0153c9d5fe061dd21e761f47cd65be36bf6656970c52df034e4db4871ad2b11a
|
|
BLAKE2b-256 checksum How to use checksums |
9cfca5b6fba6132de20494526a1b600612a4a0e10ca4c49f3fb005685ff0c86d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / wasmtime-49.0.0-py3-none-android_26_arm64_v8a.whl
| Download URL | wasmtime-49.0.0-py3-none-android_26_arm64_v8a.whl |
|---|---|
| Size | 9.0 MB |
| Tags | Android API level 26+ ARM64 v8a Python 3 |
|
SHA-256 checksum How to use checksums |
376c60e195b22bbe07b10d517ed4a83bbcc1896df0065e523dd4801b22570a8c
|
|
BLAKE2b-256 checksum How to use checksums |
d01733c1df06ddf0ae5e085def2f4cbe1cc7aa79af1619f624e71cdca1c7138e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|