Open
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub. |
|
Can you please not ping everyone who made a change to rand? |
|
Wouldn’t bother you if you too were an LLM. sweet, you can’t even mute the bot on GitHub. |
|
@wereHamster please avoid the disruption caused by your bot |
Owner
|
Sorry about that, wasn't my intention. I'll see that it doesn't cause any notifications in the future. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates rand from version 0.9.2 to 0.10.0.
Release History
The history covers 84 releases. The latest version was published 1 month ago (6 months after the current version).
0.10.0
Published 1 month ago
Changes
rand_chachahas been replaced with a dependency onchacha20. This changes the implementation behindStdRng, but the output remains the same. There may be some API breakage when using the ChaCha-types directly as these are now the ones inchacha20instead ofrand_chacha(#1642).IndexedRandom::choose_multiple->sample,choose_multiple_array->sample_array,choose_multiple_weighted->sample_weighted, structSliceChooseIter->IndexedSamplesand fnsIteratorRandom::choose_multiple->sample,choose_multiple_fill->sample_fill(#1632)Fillbe implemented for element types, not sliceable types (#1652)OsError::raw_os_erroron UEFI targets by returningOption<usize>(#1665)TryRngCore::read_adapter(..) -> RngReadAdapterwith simpler structRngReader(#1669)SeedableRng::from_os_rng,try_from_os_rng(#1674)Clonesupport forStdRng,ReseedingRng(#1677)postcardinstead ofbincodeto test the serde feature (#1693)IteratorRandom::samplewhenamountis much larger than iterator size (#1695)os_rng->sys_rng,OsRng->SysRng,OsError->SysError(#1697)Rng->RngExtas upstreamrand_corehas renamedRngCore->Rng(#1717)Additions
IndexedRandom::choose_iter,choose_weighted_iter(#1632)Xoshiro128PlusPlus,Xoshiro256PlusPlusprngs (#1649)ChaCha8Rng,ChaCha12Rng,ChaCha20Rngbehindchachafeature (#1659)rand::make_rng() -> R where R: SeedableRng(#1734)Removals
ReseedingRng(#1722)small_rng(#1732)New Contributors
chacha20to v0.10.0-rc.5 rust-random/rand#1683Full Changelog: rust-random/rand@0.9.2...0.10.0
0.10.0-rc.9
Published 1 month ago
0.10.0-rc.8
Published 2 months ago
0.10.0-rc.7
Published 2 months ago
0.10.0-rc.6
Published 3 months ago
0.10.0-rc.5
Published 4 months ago
0.10.0-rc.1
Published 5 months ago
0.10.0-rc.0
Published 6 months ago
0.9.2 (Current Version)
Published 8 months ago
0.9.1
Published 11 months ago
Changelog
Security and unsafe
zerocopydependency fromrand(#1579)Fixes
simd_supportfor recent nightly rust (#1586)Changes
fn rand::seq::index::sample_weightedandfn IndexedRandom::choose_multiple_weightedto return fewer thanamountresults (#1623), reverting an undocumented change (#1382) to the previous release.Additions
rand::distr::Alphabeticdistribution. (#1587)rand_core(#1604)New Contributors
array::from_fninDistribution<[T; N]> for StandardUniformrust-random/rand#1583Alphabeticdistribution rust-random/rand#1587Sizedrequirements for blanket impls rust-random/rand#1593Full Changelog: rust-random/rand@0.9.0...0.9.1
0.9.0
Published 1 year ago
Upgrade guide
See https://rust-random.github.io/book/update-0.9.html
Changelog
Security and unsafe
ReseedingRngandThreadRng. Instead, it is recommended to callThreadRng::reseedon fork. (#1379)zerocopyto replace someunsafecode (#1349, #1393, #1446, #1502)Dependencies
--ignore-rust-versionrand_corev0.9.0 (#1558)Features
stdfeature withoutgetrandomorrand_chacha(#1354)small_rngby default (#1455)rand_chacha; usestd_rnginstead. (#1473)serde1toserde(#1477)getrandomtoos_rng(#1537)thread_rng(#1547)API changes: rand_core traits
RngCore::read_adapterimplementingstd::io::Read(#1267)CryptoBlockRng: BlockRngCore; maketrait CryptoRng: RngCore(#1273)TryRngCore,TryCryptoRng(#1424, #1499)fn SeedableRng::from_rng->try_from_rngand add infallible variantfn from_rng(#1424)fn SeedableRng::from_entropy->from_os_rngand add fallible variantfn try_from_os_rng(#1424)CloneandAsRefto associated typeSeedableRng::Seed(#1491)API changes: Rng trait and top-level fns
rand::thread_rng()torand::rng()and remove from the prelude (#1506)rand::random()from the prelude (#1506)random_iter,random_range,random_bool,random_ratio,fill(#1488)Rng::gen_iterasrandom_iter(#1305, #1500)Rng::gentorandomto avoid conflict with the newgenkeyword in Rust 2024 (#1438)Rng::gen_rangetorandom_range,gen_booltorandom_bool,gen_ratiotorandom_ratio(#1505)#[track_caller](#1442, #1447)API changes: RNGs
<SmallRng as SeedableRng>::Seedsize to 256 bits (#1455)rng) ofReseedingRng::new(#1533)API changes: Sequences
SliceRandomintoIndexedRandom,IndexedMutRandom,SliceRandom(#1382)IndexedRandom::choose_multiple_array,index::sample_array(#1453, #1469)API changes: Distributions: renames
rand::distributionstorand::distr(#1470)StandardtoStandardUniform(#1526)distr::Slice->distr::slice::Choose,distr::EmptySlice->distr::slice::Empty(#1548)distr::DistString->distr::SampleString(#1548)distr::DistIter->distr::Iter,distr::DistMap->distr::Map(#1548)API changes: Distributions
Sizedbound onDistribution<T> for &D(#1278)Distribution<Option<T>>forStandardUniform(#1526)StandardUniformsupport allNonZero*types (#1332){Uniform, UniformSampler}::{new, new_inclusive}return aResult(instead of potentially panicking) (#1229)UniformimplementsTryFrominstead ofFromfor ranges (#1229)UniformUsize(#1487)isizeandusizevalues withStandardUniform,Uniform(except viaUniformUsize) andFilland usage as aWeightedAliasIndexweight (#1487)DistStringfor distributionsSlice<char>andUniform<char>(#1315)Slice::num_choices(#1402)p()for distributionBernoullito access probability (#1481)API changes: Weighted distributions
pubmodulerand::distr::weighted, movingWeightedIndexthere (#1548)weighted::Weight, allowingWeightedIndexto trap overflow (#1353)weight, weights, total_weightto distributionWeightedIndex(#1420)WeightedErrortoweighted::Error, revising variants (#1382) and mark as#[non_exhaustive](#1480)API changes: SIMD
std::simd, expand SIMD & docs (#1239)Reproducibility-breaking changes
ReseedingRng::reseeddiscard remaining data from the last block generated (#1379)SmallRng::seed_from_u64implementation (#1203)UniformFloat::newsamples andUniformFloat::sample_singleto yieldhigh(#1462)Slice(#1469)Uniformforusizeportable viaUniformUsize(#1487)IndexdRandom::choose_multiple_weightedfor very small seeds and optimize for large input length / low memory (#1530)Reproducibility-breaking optimisations
sample_floyd, affecting output ofrand::seq::index::sampleandrand::seq::SliceRandom::choose_multiple(#1277)IteratorRandom::chooseandchoose_stable(#1268)SliceRandom::shuffleandpartial_shuffle(#1272)Uniform: use Canon's method (single sampling) / Lemire's method (distribution sampling) for faster sampling (breaks value stability; #1287)sample_single_inclusivefor floats (+~20% perf) (#1289)Other optimisations
SmallRnginitialization performance (#1482)Other
Cargo.lock.msrvfile (#1275)rustfmtand enforce (#1448)benchescrate (#1329, #1439) and migrate to Criterion (#1490)Documentation
ThreadRngrelated docs (#1257)--generate-link-to-definitionfeature (#1327)doc_auto_cfg(#1411, #1450)All PRs
CryptoRngCoretrait implyCryptoRngas well by @cbeck88 in MakeCryptoRngCoretrait implyCryptoRngas well rust-random/rand#1230choose_weighted(_mut)mentioning accurate behavior with floats by @ISibboI in Clarify documentation ofchoose_weighted(_mut)mentioning accurate behavior with floats rust-random/rand#1245Sizedbound onDistribution<T> for &Dby @ChayimFriedman2 in RelaxSizedbound onDistribution<T> for &Drust-random/rand#1278shuffleandpartial_shuffleby @wainwrightmark in Performance improvements forshuffleandpartial_shufflerust-random/rand#1272Uniformconstructors return a result by @vks in MakeUniformconstructors return a result rust-random/rand#1229DistStringimpl toUniformandSliceby @aobatact in AddDistStringimpl toUniformandSlicerust-random/rand#1315--generate-link-to-definitionoption when building on docs.rs by @GuillaumeGomez in Add--generate-link-to-definitionoption when building on docs.rs rust-random/rand#1327Uniform::try_fromwith invalid ranges by @vks in Add tests forUniform::try_fromwith invalid ranges rust-random/rand#1331gen_rangemay overflow for floats by @vks in Mention thatgen_rangemay overflow for floats rust-random/rand#1351x86_intrinsic_implbehind x86 configuration by @MichaelOwenDyer in Put macrox86_intrinsic_implbehind x86 configuration rust-random/rand#1431Rng::gentoRng::randomby @vks in RenameRng::gentoRng::randomrust-random/rand#1438TryRngCoreandTryCryptoRngtraits by @newpavlov in AddTryRngCoreandTryCryptoRngtraits rust-random/rand#1424doc_cfgtodocsrsand usedoc_auto_cfgby @newpavlov in Renamedoc_cfgtodocsrsand usedoc_auto_cfgrust-random/rand#1450rand_distrdocumentation by @MichaelOwenDyer in Add distribution plots torand_distrdocumentation rust-random/rand#1434rand_distr: Rename Zeta parameter fromatosby @MichaelOwenDyer inrand_distr: Rename Zeta parameter fromatosrust-random/rand#1466clippy::doc_markdownwarnings. by @waywardmonkeys in Fixclippy::doc_markdownwarnings. rust-random/rand#1474serde1feature toserde. by @waywardmonkeys in Renameserde1feature toserde. rust-random/rand#1477p()forBernoulliby @marcpabst in Addp()forBernoullirust-random/rand#1481rand::range, random_bool, random_iter, random_ratio, fill as top-level helper functions by @oconnor663 in addrand::range, random_bool, random_iter, random_ratio, fill as top-level helper functions rust-random/rand#1488Standard→StandardUniformby @dhardy in RenameStandard→StandardUniformrust-random/rand#1526stdarch_x86_avx512for cpu hasavx512bwby @serendipity-crypto in Enablestdarch_x86_avx512for cpu hasavx512bwrust-random/rand#1551New Contributors
CryptoRngCoretrait implyCryptoRngas well rust-random/rand#1230choose_weighted(_mut)mentioning accurate behavior with floats rust-random/rand#1245Sizedbound onDistribution<T> for &Drust-random/rand#1278DistStringimpl toUniformandSlicerust-random/rand#1315p()forBernoullirust-random/rand#1481rand::range, random_bool, random_iter, random_ratio, fill as top-level helper functions rust-random/rand#1488stdarch_x86_avx512for cpu hasavx512bwrust-random/rand#1551Full Changelog: rust-random/rand@0.8.5...0.9.0
0.9.0-beta.3
Published 1 year ago
Changes to rand
thread_rng(#1547)distr::Slice->distr::slice::Choose,distr::EmptySlice->distr::slice::Empty(#1548)distr::DistString->distr::SampleString(#1548)distr::DistIter->distr::Iter,distr::DistMap->distr::Map(#1548)distr::{Weight, WeightError, WeightedIndex}->distr::weighted::{Weight, Error, WeightedIndex}(#1548)Changes to rand_distr
Slice->slice::Choose,EmptySlice->slice::Empty(#1548)DistString->SampleString(#1548)DistIter->Iter,DistMap->Map(#1548){Weight, WeightError, WeightedIndex}->weighted::{Weight, Error, WeightedIndex}(#1548)weighted_alias::{AliasableWeight, WeightedAliasIndex}->weighted::{..}(#1548)weighted_tree::WeightedTreeIndex->weighted::WeightedTreeIndex(#1548)New Contributors
stdarch_x86_avx512for cpu hasavx512bwrust-random/rand#1551Full Changelog: rust-random/rand@0.9.0-beta.1...0.9.0-beta.3
0.9.0-beta.1
Published 1 year ago
0.9.0-beta.0
Published 1 year ago
This is a pre-release. To depend on this version, use
rand = "=0.9.0-beta.0"to prevent automatic updates (which can be expected to include breaking changes).Security and unsafe
ReseedingRngandThreadRng. Instead, it is recommended to callThreadRng::reseedon fork. (#1379)zerocopyto replace someunsafecode (#1349, #1393, #1446, #1502)Compilation options
--ignore-rust-versionstdfeature withoutgetrandomorrand_chacha(#1354)thread_rngrelated docs (#1257)serde1feature has been renamedserde(#1477)rand_chachahas been removed. This is enabled bystd_rng. (#1473)small_rngby default (#1455)getrandomtoos_rng(#1537)Inherited changes from
rand_coreRngCore::read_adapterimplementingstd::io::Read(#1267)CryptoBlockRng: BlockRngCore; maketrait CryptoRng: RngCore(#1273)TryRngCore,TryCryptoRng(#1424, #1499)CloneandAsRefto associated typeSeedableRng::Seed(#1491)Rng trait and top-level fns
rand::thread_rng()torand::rng(), and remove from the prelude (#1506)random_iter,random_range,random_bool,random_ratio,fill(#1488)rand::random()from the prelude (#1506)Rng::gen_iterasrandom_iter(#1305, #1500)Rng::gentorandomto avoid conflict with the newgenkeyword in Rust 2024 (#1438)Rng::gen_rangetorandom_range,gen_booltorandom_bool,gen_ratiotorandom_ratio(#1505)#[track_caller](#1442, #1447)RNGs
ReseedingRng::reseeddiscard remaining data from the last block generated (#1379)SmallRng::seed_from_u64implementation (#1203)<SmallRng as SeedableRng>::Seedsize to 256 bits (#1455)rng) ofReseedingRng::new(#1533)Sequences
sample_floyd, affecting output ofrand::seq::index::sampleandrand::seq::SliceRandom::choose_multiple(#1277)IteratorRandom::chooseandchoose_stable(#1268)SliceRandom::shuffleandpartial_shuffle(#1272)SliceRandomintoIndexedRandom,IndexedMutRandom,SliceRandom(#1382)IndexedRandom::choose_multiple_array,index::sample_array(#1453, #1469)IndexdRandom::choose_multiple_weightedfor very small seeds and optimize for large input length / low memory (#1530)Distributions
rand::distributionstorand::distr(#1470)Sizedbound onDistribution<T> for &D(#1278)StandardtoStandardUniform(#1526)Distribution<Option<T>>forStandardUniform(#1526)StandardUniformsupport allNonZero*types (#1332){Uniform, UniformSampler}::{new, new_inclusive}return aResult(instead of potentially panicking) (#1229)UniformimplementsTryFrominstead ofFromfor ranges (#1229)Uniform: use Canon's method (single sampling) / Lemire's method (distribution sampling) for faster sampling (breaks value stability; #1287)UniformUsizeand use to makeUniformforusizeportable (#1487)sample_single_inclusivefor floats (+~20% perf) (#1289)UniformFloat::newsamples andUniformFloat::sample_singleto yieldhigh(#1462)DistStringfor distributionsSlice<char>andUniform<char>(#1315)Slice::num_choices(#1402)Slice(#1469)Weight, allowingWeightedIndexto trap overflow (#1353)weight, weights, total_weightto distributionWeightedIndex(#1420)WeightedErrortoWeightError, revising variants (#1382) and mark as#[non_exhaustive](#1480)p()for distributionBernoullito access probability (#1481)SIMD
std::simd, expand SIMD & docs (#1239)Documentation
Cargo.lock.msrvfile (#1275)--generate-link-to-definitionfeature (#1327)doc_auto_cfg(#1411, #1450)Other
rustfmtand enforce (#1448)benchescrate (#1329, #1439) and migrate to Criterion (#1490)New Contributors
p()forBernoullirust-random/rand#1481rand::range, random_bool, random_iter, random_ratio, fill as top-level helper functions rust-random/rand#1488Full Changelog: rust-random/rand@0.9.0-alpha.0...0.9.0-beta.0
0.9.0-alpha.2
Published 1 year ago
0.9.0-alpha.1
Published 2 years ago
0.9.0-alpha.0
Published 2 years ago
This is a pre-release. To depend on this version, use
rand = "=0.9.0-alpha.0"to prevent automatic updates (which can be expected to include breaking changes).Generators
SmallRng::seed_from_u64implementation (#1203)SeedableRngimpl forSmallRngwith inherent methods, excludingfn from_seed(#1368)Sequences
changes some outputs from
rand::seq::index::sampleandrand::seq::SliceRandom::choose_multiple.IteratorRandom::chooseandchoose_stable(#1268)SliceRandom::shuffleandpartial_shuffle(#1272)Rng::gen_iter(#1305)SliceRandomintoIndexedRandom,IndexedMutRandom,SliceRandom(#1382)Distributions
{Uniform, UniformSampler}::{new, new_inclusive}return aResult(instead of potentially panicking) (#1229)UniformimplementsTryFrominstead ofFromfor ranges (#1229)Uniformnow uses Canon's method (single sampling) / Lemire's method (distribution sampling) for faster sampling (breaks value stability; #1287)Sizedbound onDistribution<T> for &D(#1278)sample_single_inclusive(+~20% perf) (#1289)DistStringforSlice<char>andUniform<char>(#1315)Standardsupport allNonZero*types (#1332)trait Weight, allowingWeightedIndexto trap overflow (#1353)WeightedErrortoWeightError, revising variants (#1382)SIMD
std::simd, expand SIMD & docs (#1239)Other
thread_rngrelated docs (#1257)Cargo.lock.msrvfile (#1275)--generate-link-to-definitionfeature (#1327)zerocopyto replace someunsafecode (#1349)stdfeature withoutgetrandomorrand_chacha(#1354)0.8.5
Published 4 years ago
Fixes
no_std(#1173)libc::pthread_atforkreturn value with panic on error (#1178)ReseedingRngis used from a fork handler (#1178)slice_partition_at_indexfeature (#1215)simd_support: updatepacked_simd(#1216)Rngs
StdRng: Switch from HC128 to ChaCha12 on emscripten (#1142).We now use ChaCha12 on all platforms.
Documentation
0.8.4
Published 4 years ago
Additions
CloneandCopyforAlphanumeric([#1126])Distribution::mapto derive a distribution using a closure ([#1129])Slicedistribution ([#1107])DistStringtrait with impls forStandardandAlphanumeric([#1133])Other
Uniformfloat distributions for easier debugging of non-finite arguments ([#1094], [#1108])Uniformfloat distributions ([#1108])rngs::adapter::ReadRng([#1130])0.8.3
Published 5 years ago
Fixes
no-std+allocbuild by gatingchoose_multiple_weightedonstd([#1088])0.8.2
Published 5 years ago
Fixes
UniformInt::sample_single_inclusiveandRng::gen_rangewhen providing a full integer range (eg0..=MAX) ([#1087])0.8.1
Published 5 years ago
Other
0.8.0
Published 5 years ago
0.7.3
Published 6 years ago
0.7.2
Published 6 years ago
0.7.1
Published 6 years ago
0.7.0
Published 6 years ago
0.7.0-pre.2
Published 6 years ago
0.7.0-pre.1
Published 6 years ago
0.7.0-pre.0
Published 6 years ago
0.6.5
Published 7 years ago
0.3.23
Published 7 years ago
0.4.6
Published 7 years ago
0.5.6
Published 7 years ago
0.4.5
Published 7 years ago
0.6.4
Published 7 years ago
0.4.4
Published 7 years ago
0.6.3
Published 7 years ago
0.6.2
Published 7 years ago
0.6.1
Published 7 years ago
0.6.0
Published 7 years ago
0.6.0-pre.1
Published 7 years ago
0.6.0-pre.0
Published 7 years ago
0.4.3
Published 7 years ago
0.5.5
Published 7 years ago
0.5.4
Published 7 years ago
0.5.3
Published 7 years ago
0.5.2
Published 7 years ago
0.5.1
Published 7 years ago
0.5.0
Published 7 years ago
0.5.0-pre.2
Published 7 years ago
0.5.0-pre.1
Published 7 years ago
0.5.0-pre.0
Published 8 years ago
0.3.22
Published 8 years ago
0.3.21-pre.0
Published 8 years ago
0.4.2
Published 8 years ago
0.3.20
Published 8 years ago
0.3.19
Published 8 years ago
0.4.1
Published 8 years ago
0.4.0-pre.0
Published 8 years ago
0.3.18
Published 8 years ago
0.3.17
Published 8 years ago
0.3.16
Published 8 years ago
0.3.15
Published 9 years ago
0.3.14
Published 10 years ago
0.3.13
Published 10 years ago
0.3.12
Published 10 years ago
0.3.11
Published 10 years ago
0.3.10
Published 10 years ago
0.3.9
Published 10 years ago
0.3.8
Published 10 years ago
0.3.7
Published 11 years ago
0.3.6
Published 11 years ago
0.3.5
Published 11 years ago
0.3.4
Published 11 years ago
0.3.3
Published 11 years ago
0.3.2
Published 11 years ago
0.3.1
Published 11 years ago
0.3.0
Published 11 years ago
0.2.1
Published 11 years ago
0.2.0
Published 11 years ago
0.1.4
Published 11 years ago
0.1.3
Published 11 years ago
0.1.2
Published 11 years ago
0.1.1
Published 11 years ago