Function wasi_interpreter::execute_binary
source · pub fn execute_binary(
wasm_binary: Vec<u8>,
args: Vec<String>,
preopen_dirs: Vec<String>
) -> isize
Expand description
Executes a WASI-compliant WebAssembly binary.
This function constructs a wasmi state machine from a WebAssembly binary, constructs a HostExternals object consisting of any necessary Theseus or wasmi I/O, opens file descriptors for accessible directories, and executes.
Arguments
wasm_binary
: a WASI-compliant WebAssembly binary as a byte vectorargs
: a POSIX-formatted string vector of arguments to WebAssembly binarypreopen_dirs
: a string vector of directory paths to grant WASI access to