We have two different bigint backends: based on rust-gmp and num-bigint. Choosing any of them affects only performance/dev experience, but not the program behaviour. However, I found out that Serialization works differently for rust-gmp/num-bigint backends: eg. serialized num-bigint-based Bigint won't be deserialized into rust-gmp-based BigInt.
TODO:
[ ] Rewrite num-bigint (de)serialization implementation to match rust-gmp's one (should be fair enough, num-bigint support appeared just recently)
Note: rust-gmp's Bigint is serialized just into hex encoded bytes, should be very easy to do the same for num-bigint's BigInt
[ ] Add test to prevent it from ever happening again (checkout insta.rs)
We have two different bigint backends: based on
rust-gmp
andnum-bigint
. Choosing any of them affects only performance/dev experience, but not the program behaviour. However, I found out that Serialization works differently forrust-gmp
/num-bigint
backends: eg. serializednum-bigint
-based Bigint won't be deserialized intorust-gmp
-based BigInt.TODO:
[ ] Rewrite
num-bigint
(de)serialization implementation to matchrust-gmp
's one (should be fair enough,num-bigint
support appeared just recently)Note:
rust-gmp
's Bigint is serialized just into hex encoded bytes, should be very easy to do the same fornum-bigint
's BigInt