Skip to content

Commit 06d2f62

Browse files
committed
Bump rand_core to v0.10; MSRV 1.85
NOTE: depends on zkcrypto/ff#149 Release notes for `rand_core` v0.10.0: https://github.com/rust-random/rand_core/releases/tag/v0.10.0
1 parent 31e349d commit 06d2f62

File tree

5 files changed

+21
-75
lines changed

5 files changed

+21
-75
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
strategy:
4444
matrix:
4545
target:
46-
- wasm32-wasi
46+
- wasm32-wasip1
4747
- thumbv6m-none-eabi
4848
- thumbv7em-none-eabihf
4949
steps:
@@ -81,7 +81,7 @@ jobs:
8181
- uses: actions/checkout@v4
8282
- run: cargo fetch
8383
# Requires #![deny(rustdoc::broken_intra_doc_links)] in crates.
84-
- run: sudo apt-get -y install libfontconfig1-dev
84+
- run: sudo apt-get update && apt-get -y install libfontconfig1-dev
8585
- name: Check intra-doc links
8686
run: cargo doc --all-features --document-private-items
8787

Cargo.lock

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

Cargo.toml

Lines changed: 7 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.9", optional = true, default-features = false }
21+
rand_core = { version = "0.10", default-features = false }
22+
rand_xorshift = { version = "0.5", 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,6 @@ 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" }

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)