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

Method in_store

crates/wasmtime/src/runtime/code.rs:414–420  ·  view source on GitHub ↗

Find the StoreCode in a given store for a module and wrap it up with that module, ready to compute code pointers.

(
        registry: &'a ModuleRegistry,
        module: &'a Module,
    )

Source from the content-addressed store, hash-verified

412 /// Find the StoreCode in a given store for a module and wrap it
413 /// up with that module, ready to compute code pointers.
414 pub fn in_store(
415 registry: &'a ModuleRegistry,
416 module: &'a Module,
417 ) -> Option<ModuleWithCode<'a>> {
418 let store_code = registry.store_code(module.engine_code())?;
419 Some(ModuleWithCode { module, store_code })
420 }
421
422 pub(crate) fn from_raw(module: &'a Module, store_code: &'a StoreCode) -> ModuleWithCode<'a> {
423 ModuleWithCode { module, store_code }

Callers

nothing calls this directly

Calls 2

store_codeMethod · 0.80
engine_codeMethod · 0.45

Tested by

no test coverage detected