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

Method global_set

crates/debugger/src/host/opaque.rs:375–384  ·  view source on GitHub ↗
(&mut self, global: Global, val: WasmValue)

Source from the content-addressed store, hash-verified

373 }
374
375 async fn global_set(&mut self, global: Global, val: WasmValue) -> Result<()> {
376 self.with_store(move |mut store| -> Result<()> {
377 let v = val.into_val(&mut store);
378 global
379 .set(&mut store, v)
380 .map_err(|_| wit::Error::MismatchedType)?;
381 Ok(())
382 })
383 .await?
384 }
385
386 async fn table_len(&mut self, table: Table) -> Result<u64> {
387 self.with_store(move |store| table.size(&store)).await

Callers 1

setMethod · 0.80

Calls 4

OkFunction · 0.85
with_storeMethod · 0.80
into_valMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected