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

Method get_global

crates/debugger/src/host/api.rs:327–340  ·  view source on GitHub ↗
(
        &mut self,
        self_: Resource<Instance>,
        d: Resource<Debuggee>,
        global_index: u32,
    )

Source from the content-addressed store, hash-verified

325 }
326
327 async fn get_global(
328 &mut self,
329 self_: Resource<Instance>,
330 d: Resource<Debuggee>,
331 global_index: u32,
332 ) -> Result<Resource<Global>> {
333 let instance = *self.get(&self_)?;
334 let d = debugger(self, &d)?;
335 let global = d
336 .instance_get_global(instance, global_index)
337 .await?
338 .ok_or(wit::Error::InvalidEntity)?;
339 Ok(self.push(global)?)
340 }
341
342 async fn get_table(
343 &mut self,

Callers

nothing calls this directly

Calls 5

debuggerFunction · 0.85
OkFunction · 0.85
instance_get_globalMethod · 0.80
getMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected