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

Method get_global

crates/wasmtime/src/runtime/instance.rs:581–583  ·  view source on GitHub ↗

Looks up an exported [`Global`] value by name. Returns `None` if there was no export named `name`, or if there was but it wasn't a global. # Panics Panics if `store` does not own this instance.

(&self, store: impl AsContextMut, name: &str)

Source from the content-addressed store, hash-verified

579 ///
580 /// Panics if `store` does not own this instance.
581 pub fn get_global(&self, store: impl AsContextMut, name: &str) -> Option<Global> {
582 self.get_export(store, name)?.into_global()
583 }
584
585 /// Looks up a tag [`Tag`] by name.
586 ///

Calls 2

into_globalMethod · 0.80
get_exportMethod · 0.45