News for hackers. Stuff that matters.
Re:Strings in WebAssembly by AndrewDucker on Monday February 24, 2020 @08:32AM (#22403801)
An i32 is a byte.
Re:Strings in WebAssembly by kaoD on Monday February 24, 2020 @08:35AM (#22403815)
The common definition of byte nowadays is an octet.
Re:Strings in WebAssembly by kbumsik on Monday February 24, 2020 @08:42AM (#22403861)
In WASM i32 can be treated like a 8-bit byte too.
Re:Strings in WebAssembly by kaoD on Monday February 24, 2020 @08:56AM (#22403951)
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).

Re:Strings in WebAssembly by kbumsik on Monday February 24, 2020 @09:04AM (#22404005)
Although WASM types only have 32/64 bits it has 8/16 bit operations too. So it won't matter much:

https://webassembly.org/docs/semantics/