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

Method stdin_path

crates/bench-api/src/lib.rs:233–243  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

231 }
232
233 fn stdin_path(&self) -> Result<Option<PathBuf>> {
234 if self.stdin_path_ptr.is_null() {
235 return Ok(None);
236 }
237
238 let stdin_path =
239 unsafe { std::slice::from_raw_parts(self.stdin_path_ptr, self.stdin_path_len) };
240 let stdin_path =
241 std::str::from_utf8(stdin_path).context("given stdin path is not valid UTF-8")?;
242 Ok(Some(stdin_path.into()))
243 }
244
245 fn execution_flags(&self) -> Result<CommonOptions> {
246 let flags = if self.execution_flags_ptr.is_null() {

Callers 1

wasm_bench_createFunction · 0.80

Calls 3

OkFunction · 0.85
is_nullMethod · 0.80
contextMethod · 0.45

Tested by

no test coverage detected