Python扩展,用于运行WebAssembly二进制文件
项目描述
Wasmer Python,单遍编译器

wasmer
是一个完整且成熟的 Python WebAssembly 运行时。 wasmer_compiler_singlepass
为 wasmer
提供了 Singlepass 编译器,从而使 wasmer
能够编译 WebAssembly 模块。
存在其他编译器
wasmer_compiler_cranelift
,wasmer_compiler_llvm
.
要获得更完整的视图,请参阅 wasmer
包本身的文档。
安装
此包必须与 wasmer
包一起使用,因此
$ pip install wasmer
$ pip install wasmer_compiler_singlepass
用法
wasmer.engine
中的任何引擎都可以将 wasmer_compiler_singlepass.Compiler
类作为参数
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))
文档
请浏览位于 https://wasmerio.github.io/wasmer-python/api/wasmer_compiler_singlepass/ 的文档。
或者,运行 just build compiler-singlepass
后跟 just doc
以在 docs/api/wasmer_compiler_singlepass.html
内部生成文档。
项目详情
关闭
wasmer_compiler_singlepass-1.1.0-py3-none-any.whl的哈希
算法 | 哈希摘要 | |
---|---|---|
SHA256 | b323710db2c595d649b787d841cc38f5b4d8d353390225fedb765738f23ebe6f |
|
MD5 | 80840d2fbaa9cff3090f41e70fd37f45 |
|
BLAKE2b-256 | 398ddda1b8f637845cc47c57362fa17cd7eaadc5d4b648abba3434d69e7edda0 |
关闭
wasmer_compiler_singlepass-1.1.0-cp310-none-win_amd64.whl的哈希
算法 | 哈希摘要 | |
---|---|---|
SHA256 | ec567ac17f9296f4d61cc7c9936d00a042fe5fe7a51ce0bf7581f78d70dd6e68 |
|
MD5 | e2ff6357f4d9450d1c4c9ded3981960a |
|
BLAKE2b-256 | d09536801deb030fcb25c54c8e70ae9fe147a3fcff5410f76ae8cf40d0325f46 |
关闭
wasmer_compiler_singlepass-1.1.0-cp310-cp310-manylinux_2_24_x86_64.whl的哈希
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 6a5eacd1f92f9c5e4d2c3d90ed5a99bad4a6e8934c4e1b844609c493f5e1e3b8 |
|
MD5 | 1034f30166a5a6a38f1a60a90b5ec934 |
|
BLAKE2b-256 | 4e5d6b125a26e4922a6e059d2c4ee9f034aad38411b9d9e2c923bfb08971493b |
关闭
哈希值,用于 wasmer_compiler_singlepass-1.1.0-cp310-cp310-macosx_10_7_x86_64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 5fd7bfc7ac64e05b0452786f8c5e876e323f1cfc2530119a2178373707cc72bb |
|
MD5 | 59c3372150582f8239b88f0c0ff96bd0 |
|
BLAKE2b-256 | 738d16e7acc708784e2e9c8ffb6d21a88a331c85c32d54456832f6ceadea4765 |
关闭
哈希值,用于 wasmer_compiler_singlepass-1.1.0-cp39-none-win_amd64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 1fd0dacb11bb0f38ad1cbbcfd619dbb56bbc094fefed3f41caf4661e58118892 |
|
MD5 | 2dbcdebfc67dcdd4eaf2900d3af394a9 |
|
BLAKE2b-256 | 32e77258ad655eb094400760bd29ddaa508d037a1f3c0de10efa726ef2980bef |
关闭
哈希值,用于 wasmer_compiler_singlepass-1.1.0-cp39-cp39-manylinux_2_24_x86_64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | a2e6ddb828577a64f828b2494e851579ec5df06359b32592ce4b3976a902691c |
|
MD5 | f8e0e080d219d9c7bdb487e91804994d |
|
BLAKE2b-256 | 9890b06da4fd5b8ab5ef9766f98d8a17827b86faee575398025a87d55493caea |
关闭
哈希值,用于 wasmer_compiler_singlepass-1.1.0-cp39-cp39-macosx_10_7_x86_64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 45bf078e07053544c75b1e866d262e1970f362182da92a8b5ace127e58108137 |
|
MD5 | a2ad5d89c3bc5156a29efde728bab607 |
|
BLAKE2b-256 | dafaa0f227a8bd67ad04214b2645ef67381fe7f40e0aa37786daafb7dc288dcf |
关闭
哈希值,用于 wasmer_compiler_singlepass-1.1.0-cp38-none-win_amd64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 0ed07e261ae23f2e769ec314efd8eb3d6f1907b31856c3e0631b5b8b1cac3a10 |
|
MD5 | 50d1a8c383b8df2e885e8482d90f515b |
|
BLAKE2b-256 | 1770b0cd26915c4706b67bc7961236fbd2eb5e8c8d27ce40d240bbb3e5ba32f0 |
关闭
哈希值,用于 wasmer_compiler_singlepass-1.1.0-cp38-cp38-manylinux_2_24_x86_64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 5d1a60dc45bfb5a15b40070a24b34ffd09d457368fd2f1349bdb81c8bbb551e8 |
|
MD5 | 9d802f087d2163c92460f49ea6331c73 |
|
BLAKE2b-256 | 62320e04e04933063fa890469c415a6045ebc31a6d85edbd794878ee30961cc1 |
关闭
哈希值,用于 wasmer_compiler_singlepass-1.1.0-cp38-cp38-macosx_10_7_x86_64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 72362384b1f0ab2a44004cf9381f5445fed004821ddb1ee49d9f61113b566478 |
|
MD5 | b8ed12d21f50ffcb5c340d6997812c6d |
|
BLAKE2b-256 | 76f1ebbee7f39d7ba934bec113cd78e1e5d022d4918c0e179da07d26e2dce7dd |
关闭
哈希值,用于 wasmer_compiler_singlepass-1.1.0-cp37-none-win_amd64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | a6ad96bd4602c94b87a87861749c34206ae623b296bb290482c654e42692a377 |
|
MD5 | 58df55f989a4e0440dec54c82ddb0755 |
|
BLAKE2b-256 | 82a9a3940a93f4c5234ac68bf2efe45935b2d3c5f99169da66b14a34bc7a6250 |
关闭
哈希值,用于 wasmer_compiler_singlepass-1.1.0-cp37-cp37m-manylinux_2_24_x86_64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | d240a7c3dafcf134aa95e46c50b464e24c23d04136a38bf4501ac776a7c09714 |
|
MD5 | 172424bf15ba11d96be400139d68eadc |
|
BLAKE2b-256 | 01c48c598d2b743b2d1bbeb3a028d93886573e20bfe8a51d00a270421c9692bc |
关闭
哈希值,用于 wasmer_compiler_singlepass-1.1.0-cp37-cp37m-macosx_10_7_x86_64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | dc55c7fc87742f02b6879c313a916fbfadd55037163da876fb8f8f6789a52a1b |
|
MD5 | 26d4b81f2b12ac536ae64bb9f0c10953 |
|
BLAKE2b-256 | f1d7461f0d0448694d086b73a914f5f98b2ada67db81d91d7d0ea26cd3fd8db6 |