Python extension to run WebAssembly binaries
Project description
Wasmer Python
wasmer
is a complete and mature WebAssembly runtime for
Python. wasmer_compiler_singlepass
provides the Singlepass compiler
to wasmer
, so that wasmer
is able to compile WebAssembly module.
Other compilers exist:
wasmer_compiler_cranelift
,wasmer_compiler_llvm
.
To get a more complete view, please see the documentation of the
wasmer
package itself.
Install
This package must be used with the wasmer
package, thus:
$ pip install wasmer
$ pip install wasmer_compiler_singlepass
Usage
Any engines in wasmer.engine
can take the
wasmer_compiler_singlepass.Compiler
class as argument:
from wasmer import engine, Store, Module, Instance
from wasmer_compiler_singlepass import Compiler
# Let's use the Singlepass compiler with the JIT engine…
store = Store(engine.JIT(Compiler))
# … or with the native engine!
store = Store(engine.Native(Compiler))
# And now, compile the module.
module = Module(store, open('my_program.wasm', 'rb').read())
# Now it's compiled, let's instantiate it.
instance = Instance(module)
# And get fun, for example by calling the `sum` exported function!
print(instance.exports.sum(1, 2))
Documentation
Browse the documentation at https://wasmerio.github.io/wasmer-python/api/.
Alternatively, run just build compiler-singlepass
followed by just doc
to generate the documentation inside
docs/api/wasmer_compiler_singlepass.html
.
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 Distributions
Built Distributions
File details
Details for the file wasmer_compiler_singlepass-1.0.0_alpha3-cp38-none-win_amd64.whl
.
File metadata
- Download URL: wasmer_compiler_singlepass-1.0.0_alpha3-cp38-none-win_amd64.whl
- Upload date:
- Size: 530.3 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f18ee330ae3a0e1a86381ad545b8efcb6b8c1c9a42ba6e1a4929d36227534f53 |
|
MD5 | eb2abb0e1a215289372b5cb1bef29b57 |
|
BLAKE2b-256 | 80f04dbe5c0f83b9961287d003f8a10219f9a0dbe6c69fb097f06d2a6515af1d |
File details
Details for the file wasmer_compiler_singlepass-1.0.0_alpha3-cp38-cp38-manylinux1_x86_64.whl
.
File metadata
- Download URL: wasmer_compiler_singlepass-1.0.0_alpha3-cp38-cp38-manylinux1_x86_64.whl
- Upload date:
- Size: 588.4 kB
- Tags: CPython 3.8
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc305eabf0204acd3c76518b272cabbdd3b756e98cd38794773455977fd3cae1 |
|
MD5 | d6830c54cd3376c133bf1a4a0d120fea |
|
BLAKE2b-256 | 60735196f652937df940a0cfc4ef29c22ed645a195ce94464d292672bd4192e1 |
File details
Details for the file wasmer_compiler_singlepass-1.0.0_alpha3-cp38-cp38-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: wasmer_compiler_singlepass-1.0.0_alpha3-cp38-cp38-macosx_10_7_x86_64.whl
- Upload date:
- Size: 516.6 kB
- Tags: CPython 3.8, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d50906e58cbeb6c1d0e16a85e577ac0f7d95943c3b5f22a350f6bd65e3d21da |
|
MD5 | 4e0945004246a46f4a8ee5837be9fdf4 |
|
BLAKE2b-256 | d6c507b2d0bcec6e0b36751f8100370f8b4d3b32643ca2e945bc6f1682891115 |
File details
Details for the file wasmer_compiler_singlepass-1.0.0_alpha3-cp37-none-win_amd64.whl
.
File metadata
- Download URL: wasmer_compiler_singlepass-1.0.0_alpha3-cp37-none-win_amd64.whl
- Upload date:
- Size: 530.3 kB
- Tags: CPython 3.7, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6497e14321d29fcccce65e69c09deb6ada4032070b04047515e81b9213effd71 |
|
MD5 | ff0599d17983da4b730e75877db96f64 |
|
BLAKE2b-256 | de9a4412eae5973124564a8206110c2a7294e08deef85433c27b4eb9fd78b8ed |
File details
Details for the file wasmer_compiler_singlepass-1.0.0_alpha3-cp37-cp37m-manylinux1_x86_64.whl
.
File metadata
- Download URL: wasmer_compiler_singlepass-1.0.0_alpha3-cp37-cp37m-manylinux1_x86_64.whl
- Upload date:
- Size: 588.4 kB
- Tags: CPython 3.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d28b287846a345a37f188ef6a665ccaaf22a20bef4ea9754aa063690163b993 |
|
MD5 | 02b281cc0bb9ffddbb62a4c0cd5b5092 |
|
BLAKE2b-256 | 5971f6c98b14175cb83103c8a4380a0b032adb9ed4e01fb22e42d99c81c7e7e0 |
File details
Details for the file wasmer_compiler_singlepass-1.0.0_alpha3-cp37-cp37m-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: wasmer_compiler_singlepass-1.0.0_alpha3-cp37-cp37m-macosx_10_7_x86_64.whl
- Upload date:
- Size: 516.6 kB
- Tags: CPython 3.7m, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d34f7c6d34209cf1aea28b0ed020d1ec63b244c11ab9cc9669a0e36b76a849a |
|
MD5 | abebc76f447fe659af3764e7248272c4 |
|
BLAKE2b-256 | f9d0b88a9c16595f29bda2323d8f47b8d25622bc8b58664e7609c1dbabd33065 |
File details
Details for the file wasmer_compiler_singlepass-1.0.0_alpha3-cp36-none-win_amd64.whl
.
File metadata
- Download URL: wasmer_compiler_singlepass-1.0.0_alpha3-cp36-none-win_amd64.whl
- Upload date:
- Size: 530.5 kB
- Tags: CPython 3.6, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdc40baff9bc5bbc354a1457fd25e8bd810cfae09d39701e373852e002087d26 |
|
MD5 | bc47075ef66f156bfb4d97367ff2f33c |
|
BLAKE2b-256 | a4d82fef2d7dfda44827dc2a7c0c93d9b270719902bdbe3005d4bd78bf896892 |
File details
Details for the file wasmer_compiler_singlepass-1.0.0_alpha3-cp36-cp36m-manylinux1_x86_64.whl
.
File metadata
- Download URL: wasmer_compiler_singlepass-1.0.0_alpha3-cp36-cp36m-manylinux1_x86_64.whl
- Upload date:
- Size: 588.5 kB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0ef06f39a0fb66fedfa13aa7a94d88aacf5d553d6c56ab000b32d422102d7c8 |
|
MD5 | 225dfd689a9cd772146b27e4b6772249 |
|
BLAKE2b-256 | 9aede6d7e6370b30839e20a76f37740e3bb6df6a48d9e6bc3baaa63bc1abd1d8 |
File details
Details for the file wasmer_compiler_singlepass-1.0.0_alpha3-cp36-cp36m-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: wasmer_compiler_singlepass-1.0.0_alpha3-cp36-cp36m-macosx_10_7_x86_64.whl
- Upload date:
- Size: 516.8 kB
- Tags: CPython 3.6m, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54b28251b5d5ba71d9124c1ccf990c1f64f30cc07bf24c6e3280c61ce8b66809 |
|
MD5 | c8ca3982315fbf5acf97d56a89bf09e5 |
|
BLAKE2b-256 | ac813ce0df38454c2340a5807a2f16395c347c236ee315bef2e195337c3f605b |
File details
Details for the file wasmer_compiler_singlepass-1.0.0_alpha3-cp35-none-win_amd64.whl
.
File metadata
- Download URL: wasmer_compiler_singlepass-1.0.0_alpha3-cp35-none-win_amd64.whl
- Upload date:
- Size: 530.1 kB
- Tags: CPython 3.5, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.5.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9eb0b27ef314eb2db99f665806484db74b27a5b82db6bc9b0d650831c8ee85c0 |
|
MD5 | 9f666f949853d6922ae39d3a7837f44d |
|
BLAKE2b-256 | 51f0a842f9057d7e429a156dd15a7fdd01b463a8a061d3609c46f771e0edfd2c |
File details
Details for the file wasmer_compiler_singlepass-1.0.0_alpha3-cp35-cp35m-manylinux1_x86_64.whl
.
File metadata
- Download URL: wasmer_compiler_singlepass-1.0.0_alpha3-cp35-cp35m-manylinux1_x86_64.whl
- Upload date:
- Size: 588.1 kB
- Tags: CPython 3.5m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.5.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b39583731ceac22def2a6d8bfdd1851a62f0f166bb9aada2a70ed76a19ea9e71 |
|
MD5 | 3ea3b3e58b2b59f4f130a94be895f454 |
|
BLAKE2b-256 | 796ffde06a8c365b4716224c47994e27cbd66a9cffab7fcd7d1a541660a4c5d4 |
File details
Details for the file wasmer_compiler_singlepass-1.0.0_alpha3-cp35-cp35m-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: wasmer_compiler_singlepass-1.0.0_alpha3-cp35-cp35m-macosx_10_7_x86_64.whl
- Upload date:
- Size: 516.3 kB
- Tags: CPython 3.5m, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.5.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c152eacf995d72f1d857db53c7475f202af1c0f391faa94e623b0e1ea8139389 |
|
MD5 | 239319864da8dc952f5fa6f40f0ff9d6 |
|
BLAKE2b-256 | 37c274140fa6c0a7b5fd97dbbc0a484ed1a0a708e8e0ec2ab14871a1ff1692c6 |