I'm using zig to build a .wasm. The wasm decodes to the following wast
(export "inbuf" (global $9))
(global $9 i32 (i32.const 1024))
which is what I expect so the wasm is good (decoded with the WAVM project). using wagon in my own project can read the global variable "inbuf" but the initial value is 4 bytes that I do not understand.
wasm.go:154: module.Export global "inbuf" #3
wasm.go:159: module.Global #3 i32 value []byte{0x41, 0x80, 0x8, 0xb}
I would expect the GlobalEntry.Init []byte to be equal to 1024. Can someone give some explanation of this 0x4180080b value?
I'm using zig to build a .wasm. The wasm decodes to the following wast (export "inbuf" (global $9)) (global $9 i32 (i32.const 1024))
which is what I expect so the wasm is good (decoded with the WAVM project). using wagon in my own project can read the global variable "inbuf" but the initial value is 4 bytes that I do not understand.
wasm.go:154: module.Export global "inbuf" #3 wasm.go:159: module.Global #3 i32 value []byte{0x41, 0x80, 0x8, 0xb}
I would expect the GlobalEntry.Init []byte to be equal to 1024. Can someone give some explanation of this 0x4180080b value?