Source File
global.go
Belonging Package
github.com/tetratelabs/wazero/internal/wasm
package wasmimport ()// constantGlobal wraps GlobalInstance to implement api.Global.type constantGlobal struct {internalapi.WazeroOnlyTypeg *GlobalInstance}// Type implements api.Global.func ( constantGlobal) () api.ValueType {return .g.Type.ValType}// Get implements api.Global.func ( constantGlobal) () uint64 {, := .g.Value()return}// String implements api.Global.func ( constantGlobal) () string {return .g.String()}// mutableGlobal extends constantGlobal to allow updates.type mutableGlobal struct {internalapi.WazeroOnlyTypeg *GlobalInstance}// Type implements api.Global.func ( mutableGlobal) () api.ValueType {return .g.Type.ValType}// Get implements api.Global.func ( mutableGlobal) () uint64 {, := .g.Value()return}// String implements api.Global.func ( mutableGlobal) () string {return .g.String()}// Set implements the same method as documented on api.MutableGlobal.func ( mutableGlobal) ( uint64) {.g.SetValue(, 0)}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |