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

Method debug_tag

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

Get access to a tag within this instance's tag index space. This permits accessing tags 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 necessary for dev

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

Source from the content-addressed store, hash-verified

326 /// `None` is returned if guest-debugging is not enabled in the
327 /// engine configuration for this Store.
328 pub fn debug_tag(&self, mut store: impl AsContextMut, tag_index: u32) -> Option<crate::Tag> {
329 self.debug_export(
330 store.as_context_mut().0,
331 TagIndex::from_bits(tag_index).into(),
332 )
333 .and_then(|s| s.into_tag())
334 }
335
336 fn debug_export(&self, store: &mut StoreOpaque, index: EntityIndex) -> Option<Extern> {
337 if !store.engine().tunables().debug_guest {

Callers 2

private_entity_accessFunction · 0.80
instance_get_tagMethod · 0.80

Calls 3

debug_exportMethod · 0.80
into_tagMethod · 0.80
as_context_mutMethod · 0.45

Tested by

no test coverage detected