Re:Strings in WebAssembly
by AndrewDucker on Monday February 24, 2020 @08:32AM
(#22403801)
An i32 is a byte.
[ Parent
| on HN ]
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: