Skip to content

Update Rust crate rand_distr to 0.6 - #560

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/rand_distr-0.x
Open

Update Rust crate rand_distr to 0.6#560
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/rand_distr-0.x

Conversation

@renovate

@renovate renovate Bot commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Type Update Change
rand_distr (source) workspace.dependencies minor 0.40.6

Release Notes

rust-random/rand_distr (rand_distr)

v0.6.0

Compare Source

  • Bump to MSRV 1.85.0 and Edition 2024 in line with rand ([#​28])
  • Update rand to version 0.10.0 ([#​31], [#​48])
Additions
  • MultiDistribution trait to sample more efficiently from multi-dimensional distributions ([#​18])
  • Add WeightedAliasIndex::weights() to reconstruct the original weights in O(n) ([#​25])
  • ConstMultiDistribution trait as support for fixed-dimension distributions ([#​29])
Changes
  • Moved Dirichlet into the new multi module and implement MultiDistribution for it ([#​18])
  • Dirichlet no longer uses const generics, which means that its size is not required at compile time. Essentially a revert of [rand#1292]. ([#​30])
Fixes
  • Fix Geometric::new for small p > 0 where 1 - p rounds to 1 ([#​36])
  • Use direct-minimal-versions ([#​38])
  • Fix panic in FisherF::new on almost zero parameters ([#​39])
  • Fix panic in NormalInverseGaussian::new with very large alpha; this is a Value-breaking change ([#​40])
  • Fix hang and debug assertion in Zipf::new on invalid parameters ([#​41])
  • Fix panic in Binomial::sample with n ≥ 2^63; this is a Value-breaking change ([#​43])
  • Error instead of producing -inf output for Exp when lambda is -0.0 ([#​44])
  • Avoid returning NaN from Gamma::sample; this is a Value-breaking change and also affects ChiSquared and Dirichlet ([#​46])

v0.5.1

Compare Source

Testing
  • Added building the crate to CI
Fixes
  • Fix missing import for no_std builds

v0.5.0

Compare Source

Dependencies and features
API changes
  • Make distributions comparable with PartialEq ([rand#1218])
  • Dirichlet now uses const generics, which means that its size is required at compile time ([rand#1292])
  • The Dirichlet::new_with_size constructor was removed ([rand#1292])
  • Add WeightedIndexTree ([rand#1372], [rand#1444])
  • Add PertBuilder to allow specification of mean or mode ([rand#1452])
  • Rename Zeta's parameter a to s ([rand#1466])
  • Mark WeightError, PoissonError, BinomialError as #[non_exhaustive] ([rand#1480])
  • Remove support for usage of isize as a WeightedAliasIndex weight ([rand#1487])
  • Change parameter type of Zipf::new: n is now floating-point ([rand#1518])
API changes: renames
  • Move Slice -> slice::Choose, EmptySlice -> slice::Empty ([rand#1548])
  • Rename trait DistString -> SampleString ([rand#1548])
  • Rename DistIter -> Iter, DistMap -> Map ([rand#1548])
  • Move {Weight, WeightError, WeightedIndex} -> weighted::{Weight, Error, WeightedIndex} ([rand#1548])
  • Move weighted_alias::{AliasableWeight, WeightedAliasIndex} -> weighted::{..} ([rand#1548])
  • Move weighted_tree::WeightedTreeIndex -> weighted::WeightedTreeIndex ([rand#1548])
Testing
Fixes
  • Fix Knuth's method so Poisson doesn't return -1.0 for small lambda ([rand#1284])
  • Fix Poisson distribution instantiation so it return an error if lambda is infinite ([rand#1291])
  • Fix Dirichlet sample for small alpha values to avoid NaN samples ([rand#1209])
  • Fix infinite loop in Binomial distribution ([rand#1325])
  • Fix Pert distribution where mode is close to (min + max) / 2 ([rand#1452])
  • Fix panic in Binomial ([rand#1484])
  • Limit the maximal acceptable lambda for Poisson to solve ([rand#1312]) ([rand#1498])
  • Fix bug in Hypergeometric, this is a Value-breaking change ([rand#1510])
Other changes
  • Remove unused fields from Gamma, NormalInverseGaussian and Zipf distributions ([rand#1184])
    This breaks serialization compatibility with older versions.
  • Add plots for rand_distr distributions to documentation ([rand#1434])
  • Move some of the computations in Binomial from sample to new ([rand#1484])
  • Reimplement Poisson's rejection method to improve performance and correct sampling inaccuracies for large lambda values, this is a Value-breaking change ([rand#1560])

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added the dependencies Pull requests that update a dependency file label Jan 12, 2026
@renovate
renovate Bot force-pushed the renovate/rand_distr-0.x branch from a4e370d to 2a8d78b Compare February 2, 2026 19:29
@renovate
renovate Bot force-pushed the renovate/rand_distr-0.x branch from 2a8d78b to 867f7af Compare February 10, 2026 14:49
@renovate renovate Bot changed the title Update Rust crate rand_distr to 0.5 Update Rust crate rand_distr to 0.6 Feb 10, 2026
@renovate
renovate Bot force-pushed the renovate/rand_distr-0.x branch from 867f7af to 0d891b2 Compare May 18, 2026 15:01
@renovate
renovate Bot force-pushed the renovate/rand_distr-0.x branch from 0d891b2 to 79120f4 Compare July 20, 2026 19:16
@AArnott

AArnott commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Attempted to rebase this update onto current main.

rand_distr 0.6 resolves, but cargo check -p nerdbank-zcash-rust fails with rand_core trait bound errors in zcash_client_sqlite (R: rand_core::Rng / TryRng overflow). This needs a coordinated rand/rand_core migration across the zcash stack.

Not including this in the bulk dependency PR for now.

@AArnott AArnott mentioned this pull request Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant