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

Function build_wasm

tests/all/cli_tests.rs:51–56  ·  view source on GitHub ↗
(wat_path: impl AsRef<Path>)

Source from the content-addressed store, hash-verified

49}
50
51fn build_wasm(wat_path: impl AsRef<Path>) -> Result<NamedTempFile> {
52 let mut wasm_file = NamedTempFile::new()?;
53 let wasm = wat::parse_file(wat_path)?;
54 wasm_file.write(&wasm)?;
55 Ok(wasm_file)
56}
57
58// Very basic use case: compile binary wasm file and run specific function with arguments.
59#[test]

Callers 15

run_wasmtime_simpleFunction · 0.70
run_coredump_smoketestFunction · 0.70
run_wasmtime_simple_watFunction · 0.70
timeout_in_startFunction · 0.70
timeout_in_invokeFunction · 0.70
exit2_wasi_snapshot0Function · 0.70
exit2_wasi_snapshot1Function · 0.70
exit125_wasi_snapshot0Function · 0.70
exit125_wasi_snapshot1Function · 0.70
exit126_wasi_snapshot0Function · 0.70

Calls 3

OkFunction · 0.85
newFunction · 0.50
writeMethod · 0.45

Tested by

no test coverage detected