Stream: general

Topic: Byte ordering (e.g. for i32)


view this post on Zulip Alain Zscheile (Jan 14 2022 at 21:24):

I currently try to replicate the Javascript shim of wasm_bindgen in Rust using wasmtime for WASM execution, but as the return value of functions gets put into the Memory, and the fact that I would like to avoid putting helper functions into my WASM files for decoding store values, I need some way or documentation which byte order/representation i32 values in Memory have, and I wasn't able to find any documentation about that yet.

view this post on Zulip Jacob Lifshay (Jan 14 2022 at 21:55):

wasm values are always stored in little endian: https://webassembly.github.io/spec/core/exec/numerics.html#aux-bytes


Last updated: Oct 23 2024 at 20:03 UTC