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
The TypeScript runtime currently has limited support for integers larger than 2^53-1. bigint types are used when passing u64 WASM primitives, but when they’re passed as part of a MessagePack-encoded structure, they will always use number, causing precision to be lost for larger numbers.
Recently a new PR for msgpack-js made it possible to use bigint with MessagePack as well: msgpack/msgpack-javascript#211
I think it makes sense for us to implement an opt-in option with a similar effect.
The text was updated successfully, but these errors were encountered:
Initial investigation indicates that the current way of dealing with large numbers in msgpack-javascript is by encoding them as strings, which isn't great. Let's (briefly) see if the PR mentioned by @arendjr will be merged. If not we can either choose to fork msgpack-javascript (or use the PR branch) or deal with large-numbers-as-strings on the Rust side of fp-bindgen.
Might even be worthwhile to wait a bit for this (assuming it's not too long), as proper BigInt support would likely be a breaking change on our side as well.
The TypeScript runtime currently has limited support for integers larger than 2^53-1.
bigint
types are used when passingu64
WASM primitives, but when they’re passed as part of a MessagePack-encoded structure, they will always usenumber
, causing precision to be lost for larger numbers.Recently a new PR for msgpack-js made it possible to use
bigint
with MessagePack as well: msgpack/msgpack-javascript#211I think it makes sense for us to implement an opt-in option with a similar effect.
The text was updated successfully, but these errors were encountered: