Skip to content

Commit 67da3f1

Browse files
committed
[WIP] Bump rand_core to v0.10; MSRV 1.85
NOTE: depends on zkcrypto/ff#149 and forthcoming releases of `rand` and `rand_xorshift` Release notes: https://github.com/rust-random/rand_core/releases/tag/v0.10.0
1 parent 31e349d commit 67da3f1

4 files changed

Lines changed: 21 additions & 75 deletions

File tree

Cargo.lock

Lines changed: 8 additions & 67 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ authors = [
66
"Jack Grigg <jack@z.cash>",
77
]
88
edition = "2021"
9-
rust-version = "1.63"
9+
rust-version = "1.85"
1010
readme = "README.md"
1111
license = "MIT/Apache-2.0"
1212

@@ -17,9 +17,9 @@ repository = "https://github.com/zkcrypto/group"
1717

1818
[dependencies]
1919
ff = { version = "=0.14.0-pre.0", default-features = false }
20-
rand = { version = "0.9", optional = true, default-features = false }
21-
rand_core = { version = "0.9", default-features = false }
22-
rand_xorshift = { version = "0.4", optional = true }
20+
rand = { version = "0.10.0-rc.8", optional = true, default-features = false }
21+
rand_core = { version = "0.10", default-features = false }
22+
rand_xorshift = { version = "0.5.0-rc.0", optional = true }
2323
subtle = { version = "2.2.1", default-features = false }
2424

2525
# Crate for exposing the dynamic memory usage of the w-NAF structs.
@@ -33,3 +33,8 @@ wnaf-memuse = ["alloc", "memuse"]
3333

3434
[badges]
3535
maintenance = { status = "actively-developed" }
36+
37+
[patch.crates-io]
38+
ff = { git = "https://github.com/tarcieri/ff", branch = "rand_core/v0.10" }
39+
rand = { git = "https://github.com/rust-random/rand" }
40+
rand_xorshift = { git = "https://github.com/rust-random/rngs" }

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "1.63.0"
2+
channel = "1.85.0"
33
components = [ "clippy", "rustfmt" ]

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use core::fmt;
1414
use core::iter::Sum;
1515
use core::ops::{Add, AddAssign, Mul, MulAssign, Neg, Sub, SubAssign};
1616
use ff::PrimeField;
17-
use rand_core::{RngCore, TryRngCore};
17+
use rand_core::{Rng, TryRng};
1818
use subtle::{Choice, CtOption};
1919

2020
pub mod cofactor;
@@ -77,7 +77,7 @@ pub trait Group:
7777
/// this group.
7878
///
7979
/// This function is non-deterministic, and samples from the user-provided RNG.
80-
fn random<R: RngCore + ?Sized>(rng: &mut R) -> Self {
80+
fn random<R: Rng + ?Sized>(rng: &mut R) -> Self {
8181
Self::try_from_rng(rng)
8282
.map_err(|e: Infallible| e)
8383
.expect("Infallible failed")
@@ -92,7 +92,7 @@ pub trait Group:
9292
/// this group.
9393
///
9494
/// This function is non-deterministic, and samples from the user-provided RNG.
95-
fn try_from_rng<R: TryRngCore + ?Sized>(rng: &mut R) -> Result<Self, R::Error>;
95+
fn try_from_rng<R: TryRng + ?Sized>(rng: &mut R) -> Result<Self, R::Error>;
9696

9797
/// Returns the additive identity, also known as the "neutral element".
9898
fn identity() -> Self;

0 commit comments

Comments
 (0)