运行WebAssembly二进制文件的Python扩展
项目描述
Wasmer Python,LLVM 编译器

wasmer
是一个完整成熟的 WebAssembly 运行时,用于 Python。 wasmer_compiler_llvm
为 wasmer
提供了 LLVM 编译器,使得 wasmer
能够编译 WebAssembly 模块。
其他编译器存在
wasmer_compiler_cranelift
,wasmer_compiler_singlepass
.
要获取更全面的视图,请参阅 wasmer
包本身 的文档。
安装
此包必须与 wasmer
包一起使用,因此
$ pip install wasmer
$ pip install wasmer_compiler_llvm
用法
wasmer.engine
中的任何引擎都可以将 wasmer_compiler_llvm.Compiler
类作为参数
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))
文档
请访问 https://wasmerio.github.io/wasmer-python/api/wasmer_compiler_llvm/ 浏览文档。
或者,运行 just build compiler-llvm
然后运行 just doc
以在 docs/api/wasmer_compiler_llvm.html
内生成文档。
项目详情
关闭
wasmer_compiler_llvm-1.1.0-py3-none-any.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | cc7febd961dd50353c6fed475610e47a68d58d2e6ef77b735f1f850b9b007229 |
|
MD5 | 4c654912b0ab5aec7962aa05d155a9bb |
|
BLAKE2b-256 | 73a764f4a108685a985b8e8c9f72f8e2a5c390ab6fcc936abe160e650e7d6956 |
关闭
wasmer_compiler_llvm-1.1.0-cp310-cp310-manylinux_2_27_x86_64.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | d93fcea6793a7ec7e477abcd99ea83fe2c6f5866053e7e357fc5c32c50fed056 |
|
MD5 | 01e2284cd3b0c54893d24393b653732d |
|
BLAKE2b-256 | c7c3b8e6ded72dfef2b74e9659e305e63c49ffbf3bc3a6eedbd301febd984c08 |
关闭
wasmer_compiler_llvm-1.1.0-cp310-cp310-macosx_10_7_x86_64.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 11eb9dc1278ac66f01ff8119aa7e594a02e54b54d4bddd6f735779fbb7568f74 |
|
MD5 | 0b159da437226d63885ece72958640b0 |
|
BLAKE2b-256 | b91d6b8075c0de1598fce26a1b46f7f37862d963d815e0ce39f1816ad77ca71d |
关闭
wasmer_compiler_llvm-1.1.0-cp39-cp39-manylinux_2_27_x86_64.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 3a933b01276b13f0615767a3e9808df0e5fec6adac308750fe68307714a7eef2 |
|
MD5 | 471fe88d631df1b0cab9bf832d6004b8 |
|
BLAKE2b-256 | a7f6ca90f1ec8ace6ff0ac0a9f4b35b395be0c8e0fac095f73248fd5b5d5a041 |
关闭
哈希值 for wasmer_compiler_llvm-1.1.0-cp39-cp39-macosx_11_0_arm64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | fbf94cc754092ef10a3a5e1f7b6c07d1f85c597eee3253122a567d06f25d75fa |
|
MD5 | 274d4f4b446dcc198ec643b99620e718 |
|
BLAKE2b-256 | 917d14a1393aab38be4542797f0ce43ed283b11cb8c4f574a5a71f109841b5fe |
关闭
哈希值 for wasmer_compiler_llvm-1.1.0-cp39-cp39-macosx_10_7_x86_64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 6d1485db9e0ef52dbeee7d04dd30bd68f766f4c0854496cb49fe8b0c36ecd430 |
|
MD5 | bdaea99bb9ae7084e45acbbc1d31cb13 |
|
BLAKE2b-256 | 6cfdbbf9b583a196d4d0f753cbc53bde1eca201f109188b6087f8bbd070f028b |
关闭
哈希值 for wasmer_compiler_llvm-1.1.0-cp38-cp38-manylinux_2_27_x86_64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 1c7119a1de7df497ef09332128b62afc07a3d111b2870912b61ad5ab67e35826 |
|
MD5 | cc85ddfdc165b3ce82ca59d0e6c110bf |
|
BLAKE2b-256 | 6482e0f718fe7dc6bee9c1821d05fde71238c7a3d2985e1a0f3105a029422f4d |
关闭
哈希值 for wasmer_compiler_llvm-1.1.0-cp38-cp38-macosx_10_7_x86_64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | f34845d21545baec21ad36717de3616b945d142e9fe7d1ad71bc4c1e763ec193 |
|
MD5 | 5702066dae8bfeca11e5d6fda56353c8 |
|
BLAKE2b-256 | a4ada8a133d5ea3781526aa1f41c3a900992bc1a025778e6598c4668a518375c |
关闭
哈希值 for wasmer_compiler_llvm-1.1.0-cp37-cp37m-manylinux_2_27_x86_64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 6b6ecf37b31b2866b775a1a260341d442bddf415f53c72e84966f185830092fe |
|
MD5 | 06cc00bc1ce5d282f9ad927aeedcfe62 |
|
BLAKE2b-256 | fbe2dbd3ed1469256536a43885ea92153e85dfa1a58629b2277043836b1b9647 |
关闭
哈希值 for wasmer_compiler_llvm-1.1.0-cp37-cp37m-macosx_10_7_x86_64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | c074d5ac20f326498a6979d7a9fa78e47afa4ea22ffebfae986d2297b1f8d7d3 |
|
MD5 | ae1c9f53f93df3ce62739e24ff037ba3 |
|
BLAKE2b-256 | 209a392999fdee0453c70765f12bb0c4baeafb6470ac7c37ca5bb23ddac08d50 |