Closed qingshi163 closed 1 year ago
We need to check compatibility for RustPython and Ruff, also the benchmark mentioned by @DimitrisJim
I see the new merged pr #25 witch import pyo3 module with num-bigint feature. I did not work with pyo3 at all, don't know how heavy it will affect this pr.
@youknowone if possible can you help the rebase?
sure, i will
@qingshi163 is num-bigint to malachite-bigint conversion possible?
@qingshi163 is num-bigint to malachite-bigint conversion possible?
sure it is convertable with very low cost. I will add the convertion function with feature flag in malachite-bigint
Thank you! That seems the only missing component.
I have done the conversions on the malachite-bigint side. @youknowone
Great! Patching Ruff to use malachite_bigint was unbelievably easy.
Everything seems fine and working great!
@qingshi163 I will finish this PR. A little bit of concern is From<num_bigint::BigInt> for malachite_bigint::BigInt
is supported, but not AsRef<malachite_bigint::BigInt> for num_bigint::BigInt
.
When using our AST, we usually can get &BigInt
but not BigInt
except for Fold
, which is not very popular feature.
Because num-bigint
is still a fundamental part of Rust environment (yet), supporting both bigint library for a while will make sense. num-bigint
and malachite-bigint
will be exclusive features and malachite-bigint
will be the default.
I hope malachite-bigint replace more num-bigint use case.
I wish we can see https://github.com/RustPython/RustPython/pull/4952 success before merging this PR