zefchain / serde-reflection

Rust libraries and tools to help with interoperability and testing of serialization formats based on Serde.
Apache License 2.0
139 stars 26 forks source link

Make the handling of i128/u128 compatible with the Dart web platform #19

Closed jerel closed 2 years ago

jerel commented 2 years ago

Summary

The 128 bit type implementations used a 64 bit number which isn't allowed on the Dart web platform (32 bits is the max supported). This switches from the BigInt from which takes a number to the parse function which uses a string to create a BigInt instance.

Test Plan

from and parse are identical except that parse can throw an exception, in our usage it can never throw because the value is static.

ma2bd commented 2 years ago

Seems reasonable.

@kturney Any thoughts?

kturney commented 2 years ago

makes sense to me!