You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently num-bigint 0.2 is targeting rustc 1.15, with optional features for rand 0.4. However, rand 0.5 is coming soon, requiring rustc 1.22, so we should think how to support that (if at all). Options I see:
Stick with rand 0.4 only.
Wait for rand 0.5 before releasing num-bigint 0.2, and only support that.
Any users with less than rustc 1.22 won't be able to use the feature.
Go ahead and release with rand 0.4 support, and later update to a range like >=0.4, <0.6
The current rand 0.5.0-pre.2 is still compatible -- we really only use Rng::gen().
We did this with rand 0.3/0.4 in num-bigint 0.1. Sometimes Cargo handled this fine, but sometimes it required hacks to get it to use an older version.
We don't enable rand by default anymore, so some of that pain will be minimized. Only users who actually want rand will enable it, and their own choice of rand version should influence Cargo's resolution.
The text was updated successfully, but these errors were encountered:
I'm leaning towards option 2, just supporting rand 0.5, and then we can implement some of the new distributions, especially SampleUniform. We can still keep RandBigInt unchanged though.
48: Update to rand 0.5 r=cuviper a=cuviper
This closes#47, choosing to *only* support rand 0.5 (and only for their supported rustc 1.22+).
The `RandBigInt` trait still exists as an extension to all `Rng` types. It's no longer defined at all when the "rand" feature is not enabled. That was a misbehavior before, as enabling "rand" adds a blanket implementation, which would be a breaking change just by toggling the feature.
`BigUint` and `BigInt` now implement `SampleUniform` too, which lets them work natively with `Rng::gen_range`, `Rng::sample`, and `Uniform` in general.
Co-authored-by: Josh Stone <cuviper@gmail.com>
Currently num-bigint 0.2 is targeting rustc 1.15, with optional features for rand 0.4. However, rand 0.5 is coming soon, requiring rustc 1.22, so we should think how to support that (if at all). Options I see:
>=0.4, <0.6
Rng::gen()
.rand
by default anymore, so some of that pain will be minimized. Only users who actually want rand will enable it, and their own choice of rand version should influence Cargo's resolution.The text was updated successfully, but these errors were encountered: