Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve support for third-party crates #11

Open
7 of 14 tasks
cmpute opened this issue Nov 15, 2022 · 2 comments
Open
7 of 14 tasks

Improve support for third-party crates #11

cmpute opened this issue Nov 15, 2022 · 2 comments
Milestone

Comments

@cmpute
Copy link
Owner

cmpute commented Nov 15, 2022

  • Support rand for FBig and RBig
  • Support num-traits for FBig and RBig
    • Zero, One, FromPrimitive, ToPrimitive, Num
    • Euclid, Pow
  • Support zeroize for FBig and RBig
  • Support serde for FBig and RBig
    • Support the is_human_readable option (see Support is_human_readable rust-num/num-rational#90)
    • Serialize to compact binary representation if is_human_readable=false, serialize all to string if is_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 rkyv for UBig, IBig, FBig and RBig, try to do zero-copying serialization in this framework.
  • Support arbitrary::Arbitrary or quickcheck::Arbitrary for UBig, IBig, FBig and RBig
  • Support postgres decimal through sqlx, postgres, tokio-postgres or diesel crates (see fraction and rust_decimal crates)
  • Support pyo3 conversion
    • Convert UBig and IBig to native Python int
    • Convert DBig to Python decimal
    • Convert RBig and Relaxed to Python fractions
    • Convert FBig to native python float (double)
@cmpute
Copy link
Owner Author

cmpute commented Dec 3, 2022

Some crates that are related but not yet in the plan to support:

  • rust_decimal
  • half

@cmpute cmpute modified the milestones: v0.4, v0.5 Sep 13, 2023
@cmpute
Copy link
Owner Author

cmpute commented Jan 27, 2024

The support for PyO3 will be postponed, as PyO3 is being actively refactored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant