Currently I64 can't pass the boundaries of WebAssembly, it will throw an exception from the Hostfunc. BigInt was already mentioned in some issues in the WebAssembly organization, but not exactly for what I mean here.
Today V8 announced the support for the BigInt proposal (still stage 3 at the moment), we can expect to see more and more adoption soon.
My idea is:
- if the host support BigInt we can safely convert the i64 value into a BigInt value.
- If not, it would throw.
This introduces an inconsistent behavior on some hosts, but avoiding that would lock down i64 in JS for a very long time.
What do you think?
Currently I64 can't pass the boundaries of WebAssembly, it will throw an exception from the
Hostfunc. BigInt was already mentioned in some issues in the WebAssembly organization, but not exactly for what I mean here.Today V8 announced the support for the BigInt proposal (still stage 3 at the moment), we can expect to see more and more adoption soon.
My idea is:
This introduces an inconsistent behavior on some hosts, but avoiding that would lock down i64 in JS for a very long time.
What do you think?