The Cranelift compiler for the `wasmer` package (to compile WebAssembly module)
Project description
Wasmer Python, the Cranelift compiler
wasmer
is a complete and mature WebAssembly runtime for
Python. wasmer_compiler_cranelift
provides the Cranelift compiler to
wasmer
, so that wasmer
is able to compile WebAssembly module.
Other compilers exist:
wasmer_compiler_llvm
,wasmer_compiler_singlepass
.
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_cranelift
Usage
Any engines in wasmer.engine
can take the
wasmer_compiler_cranelift.Compiler
class as argument:
from wasmer import engine, Store, Module, Instance
from wasmer_compiler_cranelift import Compiler
# Let's use the Cranelift 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/wasmer_compiler_cranelift/.
Alternatively, run just build compiler-cranelift
followed by just doc
to generate the documentation inside
docs/api/wasmer_compiler_cranelift.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_cranelift-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: wasmer_compiler_cranelift-1.0.0-py3-none-any.whl
- Upload date:
- Size: 1.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 081fdc24eaaac951b84efb6c7e439ccbda8b46f512b8ae2707bcb29763d15a49 |
|
MD5 | 071c97ec884823bb12f12efd7a7052ef |
|
BLAKE2b-256 | 05f9921646f07a5751eebe2053bc6b7bd239efb98519fcb3803bf6b2fab911c9 |
File details
Details for the file wasmer_compiler_cranelift-1.0.0-cp39-none-win_amd64.whl
.
File metadata
- Download URL: wasmer_compiler_cranelift-1.0.0-cp39-none-win_amd64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dab69907c3b358ad538846af3f6e9f04ed8a88b40eb63ad434a1098b2c62ee2d |
|
MD5 | 5fe4beea4ac8425341f007a258baa00e |
|
BLAKE2b-256 | 6af9ec372b6a46ed2b00eb005e0a79c984cf646148cce57a5d0e06f91b1cf47b |
File details
Details for the file wasmer_compiler_cranelift-1.0.0-cp39-cp39-manylinux2010_x86_64.whl
.
File metadata
- Download URL: wasmer_compiler_cranelift-1.0.0-cp39-cp39-manylinux2010_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.9, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b15a38b0a22c921ea112a50bdc86ca7a302ed2fd082e57a5c409781b960fbba |
|
MD5 | 537694fb654887137b4eb206ee9e3c09 |
|
BLAKE2b-256 | 85d5edda819fe56875b70ba0312a06a44256069de36d65512a4108da84fdc9a9 |
File details
Details for the file wasmer_compiler_cranelift-1.0.0-cp39-cp39-macosx_11_0_arm64.whl
.
File metadata
- Download URL: wasmer_compiler_cranelift-1.0.0-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcedc1abf0518afcfc60cbd0fcac2d636bac02504a1cb9a42c9cc88445673929 |
|
MD5 | bd11d388da2c24d2173a4fa4abc5d207 |
|
BLAKE2b-256 | 5cb52f8ddf398dd67288f427318e395f6ded68e5462a108e21de893e8596879d |
File details
Details for the file wasmer_compiler_cranelift-1.0.0-cp39-cp39-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: wasmer_compiler_cranelift-1.0.0-cp39-cp39-macosx_10_7_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.9, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d3355eb8ccdb742c31fde104c5f6dff772d27f22712d898a22bef1ced302cfd |
|
MD5 | f39823cf7034f5727f4fdd8d5722aaac |
|
BLAKE2b-256 | 8b2ef4eb871f42f5875be62e40868333eccf363b2b96e871946d12dd3c3360a1 |
File details
Details for the file wasmer_compiler_cranelift-1.0.0-cp38-none-win_amd64.whl
.
File metadata
- Download URL: wasmer_compiler_cranelift-1.0.0-cp38-none-win_amd64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23a4f338f4d972e5273173c370d349222de7f332bc945754dbfeff91ece9927f |
|
MD5 | 745f74741563453c5b4fbe644b1961bb |
|
BLAKE2b-256 | 7907ff569b878702c0c649c217555333c1d525ce30ba640830e81dd4d9c73b3e |
File details
Details for the file wasmer_compiler_cranelift-1.0.0-cp38-cp38-manylinux2010_x86_64.whl
.
File metadata
- Download URL: wasmer_compiler_cranelift-1.0.0-cp38-cp38-manylinux2010_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e9c63f1275d674ab0aba1bb64620d0e2ec79efad96259759fa79d01f951f639 |
|
MD5 | 2b590020b0bd0319febc285b3d08ee14 |
|
BLAKE2b-256 | 690833afa0c58f54a855d58d4642885b1845925be60de8f2d3068ed8e3441f4b |
File details
Details for the file wasmer_compiler_cranelift-1.0.0-cp38-cp38-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: wasmer_compiler_cranelift-1.0.0-cp38-cp38-macosx_10_7_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.8, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 413cb45eb8f40c3b09c7cee75a10f025bb85ca408be865c5fbcb86766d5e318d |
|
MD5 | 7b69fc644b84060abef273cc1991ee02 |
|
BLAKE2b-256 | 2490ae9f045a64c784950e5010acea17ca05866c345bbf5d9c7982d49d22920f |
File details
Details for the file wasmer_compiler_cranelift-1.0.0-cp37-none-win_amd64.whl
.
File metadata
- Download URL: wasmer_compiler_cranelift-1.0.0-cp37-none-win_amd64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.7, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d795b0bfdc5c034d9bd61eb5c94e1caca8e0205bf17540bf81e993897385afd6 |
|
MD5 | 2f774592b4658a9bb8594516ddee28dc |
|
BLAKE2b-256 | cdf45b6cb2341a60639f896f1af79d950cea1e7678aa25c74338073d42429c42 |
File details
Details for the file wasmer_compiler_cranelift-1.0.0-cp37-cp37m-manylinux2010_x86_64.whl
.
File metadata
- Download URL: wasmer_compiler_cranelift-1.0.0-cp37-cp37m-manylinux2010_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd7812d1688b9b5f8ed9fe57831cf167baec5c7e070576f4be1f73ab2ec4f49d |
|
MD5 | 76282f4684b603753bf02cf64aa8d777 |
|
BLAKE2b-256 | 09518602eb7517dcb9cace45a2d78939e0c3a8d5025d9ff0056d3be68214c55b |
File details
Details for the file wasmer_compiler_cranelift-1.0.0-cp37-cp37m-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: wasmer_compiler_cranelift-1.0.0-cp37-cp37m-macosx_10_7_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.7m, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56384961fb0f853ead5b2947b95c45a029a0eb203588bfc5386a27ebeab3f13f |
|
MD5 | 3206765e41ddf829ff69b2de36a70ddf |
|
BLAKE2b-256 | f377344ee8f12d37a0ead887dab3c960c8e764808dd63632332f93f3c7010e04 |
File details
Details for the file wasmer_compiler_cranelift-1.0.0-cp36-none-win_amd64.whl
.
File metadata
- Download URL: wasmer_compiler_cranelift-1.0.0-cp36-none-win_amd64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.6, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24f97e00e2a4261e242857dc7438737f88f7e0b5d2d024e5b96ad5e20f3ea19c |
|
MD5 | 2fb23fa000368eafe1ea3ba100b471cd |
|
BLAKE2b-256 | a2db100b3f62d9cf97c4d97bd9a610bab8ed1b8d1208f3ed81e3c60c2cd8fec1 |
File details
Details for the file wasmer_compiler_cranelift-1.0.0-cp36-cp36m-manylinux2010_x86_64.whl
.
File metadata
- Download URL: wasmer_compiler_cranelift-1.0.0-cp36-cp36m-manylinux2010_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 456d525fa1bd420c738684a89afcc298f5013f8a1f637a80e16ef5a3ee2782c0 |
|
MD5 | d1c6dd0b3dffa339492845d181b60083 |
|
BLAKE2b-256 | 81518528570c1e94b1fa52821ac36d8dde7dff2aa5bce8b64eccbd7518a8d5d1 |
File details
Details for the file wasmer_compiler_cranelift-1.0.0-cp36-cp36m-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: wasmer_compiler_cranelift-1.0.0-cp36-cp36m-macosx_10_7_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.6m, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 764a51e363db28da1b4aaf3ac0aac42125d0f6af38ffdeb2a9d5aa534e500677 |
|
MD5 | 85a768993ad38a34279922804ede4463 |
|
BLAKE2b-256 | 9c62557a2be3fc9af9dd622b5da4207df737c65d6ec8d07b9b6a0046a11153ff |