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

Method module

crates/wasmtime/src/runtime/debug.rs:532–539  ·  view source on GitHub ↗

Get the module associated with the current frame, if any (i.e., not a container instance for a host-created entity).

(
        &self,
        store: impl Into<StoreContextMut<'a, T>>,
    )

Source from the content-addressed store, hash-verified

530 /// Get the module associated with the current frame, if any
531 /// (i.e., not a container instance for a host-created entity).
532 pub fn module<'a, T: 'static>(
533 &self,
534 store: impl Into<StoreContextMut<'a, T>>,
535 ) -> Result<Option<&'a Module>> {
536 let store = store.into();
537 let instance = self.raw_instance(store.0.as_store_opaque())?;
538 Ok(instance.runtime_module())
539 }
540
541 /// Get the raw function index associated with the current frame, and the
542 /// module-relative PC as an offset within the module binary, if

Callers

nothing calls this directly

Calls 4

OkFunction · 0.85
raw_instanceMethod · 0.80
as_store_opaqueMethod · 0.80
runtime_moduleMethod · 0.80

Tested by

no test coverage detected