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

Method execution_flags

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

Source from the content-addressed store, hash-verified

243 }
244
245 fn execution_flags(&self) -> Result<CommonOptions> {
246 let flags = if self.execution_flags_ptr.is_null() {
247 ""
248 } else {
249 let execution_flags = unsafe {
250 std::slice::from_raw_parts(self.execution_flags_ptr, self.execution_flags_len)
251 };
252 std::str::from_utf8(execution_flags)
253 .context("given execution flags string is not valid UTF-8")?
254 };
255 let options = CommonOptions::try_parse_from(
256 ["wasmtime"]
257 .into_iter()
258 .chain(flags.split(' ').filter(|s| !s.is_empty())),
259 )
260 .context("failed to parse options")?;
261 Ok(options)
262 }
263}
264
265/// Exposes a C-compatible way of creating the engine from the bytes of a single

Callers 1

wasm_bench_createFunction · 0.80

Calls 7

OkFunction · 0.85
is_nullMethod · 0.80
chainMethod · 0.80
splitMethod · 0.80
contextMethod · 0.45
into_iterMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected