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
if you return u64::MAX from rust and then use dlopen() with { ..., result: u64 } you will get a different value in JS.
It does exactly the same thing if you input it to a deno console but that's probably unrelated:
Deno 1.14.0
exit using ctrl+d or close()
> 18446744073709551615
18446744073709552000
>
Maybe this is expected behavior but it should be at least documented and I would say it's not terribly useful then for native plugins. Maybe it should return BigInt instead?
The internal serdes library serde_v8 forwards all f32/f64/u64 to f64 (normal JS numbers). Opened an issue there: denoland/serde_v8#43
It looks like that repository has been archived. There is some good discussion on that thread about opaque pointers. Should that discussion be moved here?
if you return
u64::MAX
from rust and then usedlopen()
with{ ..., result: u64 }
you will get a different value in JS.It does exactly the same thing if you input it to a
deno
console but that's probably unrelated:Maybe this is expected behavior but it should be at least documented and I would say it's not terribly useful then for native plugins. Maybe it should return
BigInt
instead?rust example:
deno
The text was updated successfully, but these errors were encountered: