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

Function wasm_module_deserialize

crates/c-api/src/module.rs:119–127  ·  view source on GitHub ↗
(
    store: &mut wasm_store_t,
    binary: &wasm_byte_vec_t,
)

Source from the content-addressed store, hash-verified

117
118#[unsafe(no_mangle)]
119pub unsafe extern "C" fn wasm_module_deserialize(
120 store: &mut wasm_store_t,
121 binary: &wasm_byte_vec_t,
122) -> Option<Box<wasm_module_t>> {
123 match Module::deserialize(store.store.context().engine(), binary.as_slice()) {
124 Ok(module) => Some(Box::new(wasm_module_t::new(module))),
125 Err(_) => None,
126 }
127}
128
129#[derive(Clone)]
130pub struct wasmtime_module_t {

Callers

nothing calls this directly

Calls 5

deserializeFunction · 0.50
newFunction · 0.50
engineMethod · 0.45
contextMethod · 0.45
as_sliceMethod · 0.45

Tested by

no test coverage detected