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

Method from_binary

crates/wasmtime/src/runtime/module.rs:320–324  ·  view source on GitHub ↗
(engine: &Engine, binary: &[u8])

Source from the content-addressed store, hash-verified

318 /// ```
319 #[cfg(any(feature = "cranelift", feature = "winch"))]
320 pub fn from_binary(engine: &Engine, binary: &[u8]) -> Result<Module> {
321 crate::CodeBuilder::new(engine)
322 .wasm_binary(binary, None)?
323 .compile_module()
324 }
325
326 /// Creates a new WebAssembly `Module` from the contents of the given `file`
327 /// on disk, but with assumptions that the file is from a trusted source.

Callers

nothing calls this directly

Calls 3

compile_moduleMethod · 0.80
wasm_binaryMethod · 0.80
newFunction · 0.50

Tested by

no test coverage detected