3 ms·
> One of the hardest parts of working with WebAssembly is getting different kinds of values into and out of functions. That’s because WebAssembly currently only
by e12e 9y ago
> One of the hardest parts of working with WebAssembly is getting different kinds of values into and out of functions. That’s because WebAssembly currently only has two types: integers and floating point numbers.
So... The only overlap between Javascript and webassembly is floating point numbers? Are they the same type of floating point?
And is the conversion unicode-string > js float > ws int - or something else?
Or does js have integers now?
- zdragnar 9y agoTyped arrays are available in JS, originally for webgl support, and enhanced (I think?) for web assembly.
- echeese 9y agoJS doesn't have integer, but its Number is really just a double, which has a 52 bit mantissa, meaning it can hold any 8, 16 or 32 bit integer. Only 64 bit integers are unable to be stored in a double, which is why the WASM->JS interface doesn't allow them.