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

Method debug_memory

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

Get access to a memory (unshared only) within this instance's memory index space. This permits accessing memories whether they are exported or not. However, it is only available for purposes of debugging, and so is only permitted when `guest_debug` is enabled in the Engine's configuration. The intent of the Wasmtime API is to enforce the Wasm type system's encapsulation even in the host API, exce

(
        &self,
        mut store: impl AsContextMut,
        memory_index: u32,
    )

Source from the content-addressed store, hash-verified

219 /// `None` is returned if guest-debugging is not enabled in the
220 /// engine configuration for this Store.
221 pub fn debug_memory(
222 &self,
223 mut store: impl AsContextMut,
224 memory_index: u32,
225 ) -> Option<crate::Memory> {
226 self.debug_export(
227 store.as_context_mut().0,
228 MemoryIndex::from_bits(memory_index).into(),
229 )
230 .and_then(|s| s.into_memory())
231 }
232
233 /// Get access to a shared memory within this instance's memory
234 /// index space.

Callers 3

private_entity_accessFunction · 0.80
debug_idsFunction · 0.80
instance_get_memoryMethod · 0.80

Calls 3

debug_exportMethod · 0.80
into_memoryMethod · 0.80
as_context_mutMethod · 0.45

Tested by

no test coverage detected