Skip to main content

Python extension to run WebAssembly binaries

Project description

Wasmer logo Wasmer Python, the LLVM compiler PyPI version Wasmer Python Documentation Wasmer PyPI downloads Wasmer Slack Channel

wasmer is a complete and mature WebAssembly runtime for Python. wasmer_compiler_llvm provides the LLVM compiler to wasmer, so that wasmer is able to compile WebAssembly module.

Other compilers exist:

  • wasmer_compiler_cranelift,
  • 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_llvm

Usage

Any engines in wasmer.engine can take the wasmer_compiler_llvm.Compiler class as argument:

from wasmer import engine, Store, Module, Instance
from wasmer_compiler_llvm import Compiler

# Let's use the LLVM 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_llvm/.

Alternatively, run just build compiler-llvm followed by just doc to generate the documentation inside docs/api/wasmer_compiler_llvm.html.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

wasmer_compiler_llvm-1.1.0-py3-none-any.whl (1.8 kB view details)

Uploaded Python 3

wasmer_compiler_llvm-1.1.0-cp310-cp310-manylinux_2_27_x86_64.whl (13.2 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.27+ x86-64

wasmer_compiler_llvm-1.1.0-cp310-cp310-macosx_10_7_x86_64.whl (12.4 MB view details)

Uploaded CPython 3.10 macOS 10.7+ x86-64

wasmer_compiler_llvm-1.1.0-cp39-cp39-manylinux_2_27_x86_64.whl (13.2 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.27+ x86-64

wasmer_compiler_llvm-1.1.0-cp39-cp39-macosx_11_0_arm64.whl (12.9 MB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

wasmer_compiler_llvm-1.1.0-cp39-cp39-macosx_10_7_x86_64.whl (12.4 MB view details)

Uploaded CPython 3.9 macOS 10.7+ x86-64

wasmer_compiler_llvm-1.1.0-cp38-cp38-manylinux_2_27_x86_64.whl (13.2 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.27+ x86-64

wasmer_compiler_llvm-1.1.0-cp38-cp38-macosx_10_7_x86_64.whl (12.4 MB view details)

Uploaded CPython 3.8 macOS 10.7+ x86-64

wasmer_compiler_llvm-1.1.0-cp37-cp37m-manylinux_2_27_x86_64.whl (13.2 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.27+ x86-64

wasmer_compiler_llvm-1.1.0-cp37-cp37m-macosx_10_7_x86_64.whl (12.4 MB view details)

Uploaded CPython 3.7m macOS 10.7+ x86-64

File details

Details for the file wasmer_compiler_llvm-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: wasmer_compiler_llvm-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 1.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for wasmer_compiler_llvm-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cc7febd961dd50353c6fed475610e47a68d58d2e6ef77b735f1f850b9b007229
MD5 4c654912b0ab5aec7962aa05d155a9bb
BLAKE2b-256 73a764f4a108685a985b8e8c9f72f8e2a5c390ab6fcc936abe160e650e7d6956

See more details on using hashes here.

File details

Details for the file wasmer_compiler_llvm-1.1.0-cp310-cp310-manylinux_2_27_x86_64.whl.

File metadata

  • Download URL: wasmer_compiler_llvm-1.1.0-cp310-cp310-manylinux_2_27_x86_64.whl
  • Upload date:
  • Size: 13.2 MB
  • Tags: CPython 3.10, manylinux: glibc 2.27+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for wasmer_compiler_llvm-1.1.0-cp310-cp310-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 d93fcea6793a7ec7e477abcd99ea83fe2c6f5866053e7e357fc5c32c50fed056
MD5 01e2284cd3b0c54893d24393b653732d
BLAKE2b-256 c7c3b8e6ded72dfef2b74e9659e305e63c49ffbf3bc3a6eedbd301febd984c08

See more details on using hashes here.

File details

Details for the file wasmer_compiler_llvm-1.1.0-cp310-cp310-macosx_10_7_x86_64.whl.

File metadata

  • Download URL: wasmer_compiler_llvm-1.1.0-cp310-cp310-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 12.4 MB
  • Tags: CPython 3.10, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for wasmer_compiler_llvm-1.1.0-cp310-cp310-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 11eb9dc1278ac66f01ff8119aa7e594a02e54b54d4bddd6f735779fbb7568f74
MD5 0b159da437226d63885ece72958640b0
BLAKE2b-256 b91d6b8075c0de1598fce26a1b46f7f37862d963d815e0ce39f1816ad77ca71d

See more details on using hashes here.

File details

Details for the file wasmer_compiler_llvm-1.1.0-cp39-cp39-manylinux_2_27_x86_64.whl.

File metadata

  • Download URL: wasmer_compiler_llvm-1.1.0-cp39-cp39-manylinux_2_27_x86_64.whl
  • Upload date:
  • Size: 13.2 MB
  • Tags: CPython 3.9, manylinux: glibc 2.27+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for wasmer_compiler_llvm-1.1.0-cp39-cp39-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 3a933b01276b13f0615767a3e9808df0e5fec6adac308750fe68307714a7eef2
MD5 471fe88d631df1b0cab9bf832d6004b8
BLAKE2b-256 a7f6ca90f1ec8ace6ff0ac0a9f4b35b395be0c8e0fac095f73248fd5b5d5a041

See more details on using hashes here.

File details

Details for the file wasmer_compiler_llvm-1.1.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

  • Download URL: wasmer_compiler_llvm-1.1.0-cp39-cp39-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 12.9 MB
  • Tags: CPython 3.9, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for wasmer_compiler_llvm-1.1.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fbf94cc754092ef10a3a5e1f7b6c07d1f85c597eee3253122a567d06f25d75fa
MD5 274d4f4b446dcc198ec643b99620e718
BLAKE2b-256 917d14a1393aab38be4542797f0ce43ed283b11cb8c4f574a5a71f109841b5fe

See more details on using hashes here.

File details

Details for the file wasmer_compiler_llvm-1.1.0-cp39-cp39-macosx_10_7_x86_64.whl.

File metadata

  • Download URL: wasmer_compiler_llvm-1.1.0-cp39-cp39-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 12.4 MB
  • Tags: CPython 3.9, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for wasmer_compiler_llvm-1.1.0-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 6d1485db9e0ef52dbeee7d04dd30bd68f766f4c0854496cb49fe8b0c36ecd430
MD5 bdaea99bb9ae7084e45acbbc1d31cb13
BLAKE2b-256 6cfdbbf9b583a196d4d0f753cbc53bde1eca201f109188b6087f8bbd070f028b

See more details on using hashes here.

File details

Details for the file wasmer_compiler_llvm-1.1.0-cp38-cp38-manylinux_2_27_x86_64.whl.

File metadata

  • Download URL: wasmer_compiler_llvm-1.1.0-cp38-cp38-manylinux_2_27_x86_64.whl
  • Upload date:
  • Size: 13.2 MB
  • Tags: CPython 3.8, manylinux: glibc 2.27+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for wasmer_compiler_llvm-1.1.0-cp38-cp38-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 1c7119a1de7df497ef09332128b62afc07a3d111b2870912b61ad5ab67e35826
MD5 cc85ddfdc165b3ce82ca59d0e6c110bf
BLAKE2b-256 6482e0f718fe7dc6bee9c1821d05fde71238c7a3d2985e1a0f3105a029422f4d

See more details on using hashes here.

File details

Details for the file wasmer_compiler_llvm-1.1.0-cp38-cp38-macosx_10_7_x86_64.whl.

File metadata

  • Download URL: wasmer_compiler_llvm-1.1.0-cp38-cp38-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 12.4 MB
  • Tags: CPython 3.8, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for wasmer_compiler_llvm-1.1.0-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 f34845d21545baec21ad36717de3616b945d142e9fe7d1ad71bc4c1e763ec193
MD5 5702066dae8bfeca11e5d6fda56353c8
BLAKE2b-256 a4ada8a133d5ea3781526aa1f41c3a900992bc1a025778e6598c4668a518375c

See more details on using hashes here.

File details

Details for the file wasmer_compiler_llvm-1.1.0-cp37-cp37m-manylinux_2_27_x86_64.whl.

File metadata

  • Download URL: wasmer_compiler_llvm-1.1.0-cp37-cp37m-manylinux_2_27_x86_64.whl
  • Upload date:
  • Size: 13.2 MB
  • Tags: CPython 3.7m, manylinux: glibc 2.27+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for wasmer_compiler_llvm-1.1.0-cp37-cp37m-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 6b6ecf37b31b2866b775a1a260341d442bddf415f53c72e84966f185830092fe
MD5 06cc00bc1ce5d282f9ad927aeedcfe62
BLAKE2b-256 fbe2dbd3ed1469256536a43885ea92153e85dfa1a58629b2277043836b1b9647

See more details on using hashes here.

File details

Details for the file wasmer_compiler_llvm-1.1.0-cp37-cp37m-macosx_10_7_x86_64.whl.

File metadata

  • Download URL: wasmer_compiler_llvm-1.1.0-cp37-cp37m-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 12.4 MB
  • Tags: CPython 3.7m, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for wasmer_compiler_llvm-1.1.0-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 c074d5ac20f326498a6979d7a9fa78e47afa4ea22ffebfae986d2297b1f8d7d3
MD5 ae1c9f53f93df3ce62739e24ff037ba3
BLAKE2b-256 209a392999fdee0453c70765f12bb0c4baeafb6470ac7c37ca5bb23ddac08d50

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page