And linear memory, which is just an array of bytes.
Re:Strings in WebAssembly
by AndrewDucker on Monday February 24, 2020 @08:32AM
(#22403801)
An i32 is a byte.
The common definition of byte nowadays is an octet.
In WASM i32 can be treated like a 8-bit byte too.
Can you elaborate? I'm not well-versed in WASM internals and I might be missing something.
I mean, any integer with 8+ bits can be treated like an octet, but memory layout is very different (e.g. an array of i8 and an array of i32 look very different even if they represent the same values).
Although WASM types only have 32/64 bits it has 8/16 bit operations too. So it won't matter much:
It doesn't appear to do even that though. You get i32, i64, f32, and f64. The linear memory is some multiple of the 64KiB page size.