dashu
dashu copied to clipboard
Improve support for third-party crates
- [x] Support
rand
forFBig
andRBig
- [x] Support
num-traits
forFBig
andRBig
- [x]
Zero
,One
,FromPrimitive
,ToPrimitive
,Num
- [x]
Euclid
,Pow
- [x]
- [x] Support
zeroize
forFBig
andRBig
- [x] Support
serde
forFBig
andRBig
- Support the
is_human_readable
option (see https://github.com/rust-num/num-rational/issues/90) - Serialize to compact binary representation if
is_human_readable=false
, serialize all to string ifis_human_readable=true
- Improve efficiency of serialized
IBig
by store the sign bit in the LSB of the highest word (by always shifting the highest word left by 1). This is the zigzag encoding used by postcard.
- Support the
- [ ] Support
rkyv
forUBig
,IBig
,FBig
andRBig
, try to do zero-copying serialization in this framework. - [ ] Support
arbitrary::Arbitrary
orquickcheck::Arbitrary
forUBig
,IBig
,FBig
andRBig
- [x] Support postgres decimal through
sqlx
,postgres
,tokio-postgres
ordiesel
crates (seefraction
andrust_decimal
crates) - [ ] ~~Support
pyo3
conversion~~- [ ] ~~Convert
UBig
andIBig
to native Python int~~ - [ ] ~~Convert
DBig
to Python decimal~~ - [ ] ~~Convert
RBig
andRelaxed
to Python fractions~~ - [ ] ~~Convert
FBig
to native python float (double)~~
- [ ] ~~Convert
Some crates that are related but not yet in the plan to support:
-
rust_decimal
-
half
The support for PyO3 will be postponed, as PyO3 is being actively refactored.