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

Method debug_function

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

Get access to a function within this instance's function index space. This permits accessing functions 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, except where ne

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

Source from the content-addressed store, hash-verified

301 /// `None` is returned if guest-debugging is not enabled in the
302 /// engine configuration for this Store.
303 pub fn debug_function(
304 &self,
305 mut store: impl AsContextMut,
306 function_index: u32,
307 ) -> Option<crate::Func> {
308 self.debug_export(
309 store.as_context_mut().0,
310 FuncIndex::from_bits(function_index).into(),
311 )
312 .and_then(|s| s.into_func())
313 }
314
315 /// Get access to a tag within this instance's tag index space.
316 ///

Callers 2

private_entity_accessFunction · 0.80
instance_get_funcMethod · 0.80

Calls 3

debug_exportMethod · 0.80
as_context_mutMethod · 0.45
into_funcMethod · 0.45

Tested by

no test coverage detected