8 个版本

0.6.3 2022 年 8 月 8 日
0.6.2 2022 年 7 月 28 日
0.5.1 2022 年 5 月 24 日
0.4.0 2022 年 4 月 12 日

#688WebAssembly

Download history 38/week @ 2024-03-30 10/week @ 2024-04-06

每月 293 次下载

Apache-2.0 协议

140KB
3.5K SLoC

enarx-exec-wasmtime

enarx-exec-wasmtime - Enarx WebAssembly 加载器

enarx-exec-wasmtime 负责在 Enarx 隔离区中加载和运行 WebAssembly 模块。

用户通常不会直接执行 enarx-exec-wasmtime,但在测试/调试目的下,可以使用它运行带有指定命令行参数和环境变量的 .wasm 文件。

示例调用

$ wat2wasm ../tests/wasm/return_1.wat
$ RUST_LOG=enarx-exec-wasmtime=info RUST_BACKTRACE=1 cargo run -- return_1.wasm
    Finished dev [unoptimized + debuginfo] target(s) in 0.03s
     Running `target/x86_64-unknown-linux-musl/debug/enarx-exec-wasmtime return_1.wasm`
[INFO  enarx-exec-wasmtime] version 0.2.0 starting up
[WARN  enarx-exec-wasmtime] 🌭DEV-ONLY BUILD, NOT FOR PRODUCTION USE🌭
[INFO  enarx-exec-wasmtime] opts: RunOptions {
        envs: [],
        module: Some(
            "return_1.wasm",
        ),
        args: [],
    }
[INFO  enarx-exec-wasmtime] reading module from "return_1.wasm"
[INFO  enarx-exec-wasmtime] running workload
[WARN  enarx-exec-wasmtime::workload] inheriting stdio from calling process
[INFO  enarx-exec-wasmtime] got result: Ok(
        [
            I32(
                1,
            ),
        ],
    )

如果没有指定文件名,enarx-exec-wasmtime 假设从文件描述符 3 读取 WebAssembly 模块,因此这将是等效的

$ RUST_LOG=enarx-exec-wasmtime=info RUST_BACKTRACE=1 cargo run -- 3< return_1.wasm

许可证:Apache-2.0

依赖关系

~39–56MB
~1M SLoC