8 releases

Uses new Rust 2021

0.6.3 Aug 8, 2022
0.6.2 Jul 28, 2022
0.5.1 May 24, 2022
0.4.0 Apr 12, 2022

#203 in WebAssembly

Download history 356/week @ 2022-08-15 367/week @ 2022-08-22 352/week @ 2022-08-29 307/week @ 2022-09-05 211/week @ 2022-09-12 167/week @ 2022-09-19 145/week @ 2022-09-26 141/week @ 2022-10-03 107/week @ 2022-10-10 105/week @ 2022-10-17 113/week @ 2022-10-24 119/week @ 2022-10-31 107/week @ 2022-11-07 119/week @ 2022-11-14 110/week @ 2022-11-21 95/week @ 2022-11-28

446 downloads per month
Used in enarx

Apache-2.0 and AGPL-3.0-or-later

140KB
3.5K SLoC

enarx-exec-wasmtime

enarx-exec-wasmtime - the Enarx WebAssembly loader

enarx-exec-wasmtime is responsible for loading and running WebAssembly modules inside an Enarx keep.

Users generally won't execute enarx-exec-wasmtime directly, but for test/debugging purposes it can be used to run a .wasm file with given command-line arguments and environment variables.

Example invocation

$ 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,
            ),
        ],
    )

If no filename is given, enarx-exec-wasmtime expects to read the WebAssembly module from file descriptor 3, so this would be equivalent:

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

License: Apache-2.0

Dependencies

~45MB
~1M SLoC