MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / run_wasmtime_simple

Function run_wasmtime_simple

tests/all/cli_tests.rs:60–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

58// Very basic use case: compile binary wasm file and run specific function with arguments.
59#[test]
60fn run_wasmtime_simple() -> Result<()> {
61 let wasm = build_wasm("tests/all/cli_tests/simple.wat")?;
62 run_wasmtime(&[
63 "run",
64 "--invoke",
65 "simple",
66 "-Ccache=n",
67 wasm.path().to_str().unwrap(),
68 "4",
69 ])?;
70 Ok(())
71}
72
73// Wasmtime shall fail when not enough arguments were provided.
74#[test]

Callers

nothing calls this directly

Calls 6

run_wasmtimeFunction · 0.85
OkFunction · 0.85
to_strMethod · 0.80
build_wasmFunction · 0.70
unwrapMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected