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

Method instance

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

Get the instance associated with the current frame.

(&self, mut store: impl AsContextMut)

Source from the content-addressed store, hash-verified

521
522 /// Get the instance associated with the current frame.
523 pub fn instance(&self, mut store: impl AsContextMut) -> Result<Instance> {
524 let store = store.as_context_mut();
525 let instance = self.raw_instance(store.0.as_store_opaque())?;
526 let id = instance.id();
527 Ok(Instance::from_wasmtime(id, store.0.as_store_opaque()))
528 }
529
530 /// Get the module associated with the current frame, if any
531 /// (i.e., not a container instance for a host-created entity).

Callers 15

make_linkerFunction · 0.45
module_interpositionFunction · 0.45
handleMethod · 0.45
native_loads_and_storesFunction · 0.45
introspectionFunction · 0.45
instance_exportsFunction · 0.45
functions_in_instancesFunction · 0.45

Calls 5

OkFunction · 0.85
raw_instanceMethod · 0.80
as_store_opaqueMethod · 0.80
as_context_mutMethod · 0.45
idMethod · 0.45

Tested by 15

introspectionFunction · 0.36
functions_in_instancesFunction · 0.36
link_component_spectestFunction · 0.36
add_to_linkerFunction · 0.36
add_to_linkerFunction · 0.36
add_to_linkerFunction · 0.36
add_to_linkerFunction · 0.36
add_to_linkerFunction · 0.36
add_to_linkerFunction · 0.36
add_to_linkerFunction · 0.36