You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am writing JavaScript code that interfaces with WebAssembly. The WebAssembly memory is exposed as an ArrayBuffer which I wrap in a Uint8Array and a DataView for access.
WebAssembly values are typed as i32, i64, f32, f64. Three of them are nicely mirrored in the typed array world and WebIDL. However, i64 is missing the Int64Array, Uint64Array and DataView.setInt64, DataView.setUint64 counterparts.
I tried to find out why they are not standardized, but was not successful. In my opinion that would be a reasonable addition.
I see that JavaScript's Number.MAX_SAFE_INTEGER is less than 2^64, is that the "reason"? Writing values up to that number to some buffer using DataView.set(Ui|I)nt64 should not be a problem, reading unsafe integers however requires consideration.
Note that I arrived here via a slight detour through whatwg/webidl#586
The text was updated successfully, but these errors were encountered:
I am writing JavaScript code that interfaces with WebAssembly. The WebAssembly memory is exposed as an
ArrayBuffer
which I wrap in aUint8Array
and aDataView
for access.WebAssembly values are typed as
i32
,i64
,f32
,f64
. Three of them are nicely mirrored in the typed array world and WebIDL. However,i64
is missing theInt64Array
,Uint64Array
andDataView.setInt64
,DataView.setUint64
counterparts.I tried to find out why they are not standardized, but was not successful. In my opinion that would be a reasonable addition.
I see that JavaScript's
Number.MAX_SAFE_INTEGER
is less than 2^64, is that the "reason"? Writing values up to that number to some buffer usingDataView.set(Ui|I)nt64
should not be a problem, reading unsafe integers however requires consideration.Note that I arrived here via a slight detour through whatwg/webidl#586
The text was updated successfully, but these errors were encountered: