Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from rust-random:master #10

Open
wants to merge 747 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
747 commits
Select commit Hold shift + click to select a range
ece8e48
Add Lcg128CmDxsm64 generator compatible with NumPy's PCG64DXSM.
adamreichold Nov 18, 2021
6107f93
Apply the same copy-editing to the existing generators as was discuss…
adamreichold Nov 19, 2021
f44ea42
Extend generator benchmarks to include the newly added Pcg64Dxsm vari…
adamreichold Dec 6, 2021
19404d6
Merge pull request #1202 from adamreichold/numpy-compat
vks Dec 6, 2021
7f9aa2b
rand_distr: fix no_std build
newpavlov Dec 28, 2021
e9f5cfc
bump rand_distr to v0.4.3
newpavlov Dec 28, 2021
9ef737b
update changelog
newpavlov Dec 28, 2021
745ace8
rand_distr: Fix dirichlet sample method for small alpha.
WarrenWeckesser Jan 2, 2022
8f37250
Merge pull request #1208 from newpavlov/rand_distr/fix_no_std
vks Jan 13, 2022
73f8ffd
Remove unused `slice_partition_at_index` feature
novacrazy Feb 7, 2022
fa04c15
Merge pull request #1215 from Lantern-chat/master
dhardy Feb 7, 2022
d3ca11b
Update to packed_simd_2 0.3.7
dhardy Feb 8, 2022
a407bdf
Merge pull request #1216 from rust-random/work5
vks Feb 8, 2022
9f20df0
Making distributions comparable by deriving PartialEq. Tests included
Feb 11, 2022
dbbc1bf
Merge pull request #1218 from Will-Low/master
dhardy Feb 11, 2022
2924af6
Merge pull request #1183 from vks/fill-float-doc
dhardy Feb 11, 2022
937320c
Update CHANGELOG for 0.8.5 (#1221)
dhardy Feb 14, 2022
546acdc
README: bump rand version
dhardy Feb 14, 2022
a8474f7
update Miri CI config (#1223)
RalfJung Mar 9, 2022
5f0d3a1
rand_distr: Remove unused fields
vks Sep 15, 2021
13193fc
fix typo
cuishuang Apr 20, 2022
367cf50
Merge pull request #1228 from cuishuang/master
vks Apr 20, 2022
f0f15b5
Merge pull request #1184 from vks/remove-unused-fields
vks Apr 21, 2022
3543f4b
Make `CryptoRngCore` trait imply `CryptoRng` as well (#1230)
May 19, 2022
330efe9
Deterministic Rayon monte carlo example (#1236)
masonk Jul 7, 2022
6112c84
small deterministic example update
TheIronBorn Jul 7, 2022
1f99bb7
assert deterministic
TheIronBorn Jul 8, 2022
89d7e4e
another typo
TheIronBorn Jul 9, 2022
599d7f8
switch to std::simd, expand SIMD stuff & docs
TheIronBorn Jul 7, 2022
d4b8748
fix simd ints, clarify mask behavior
TheIronBorn Jul 11, 2022
f89f15f
fix doc link
TheIronBorn Aug 4, 2022
1d55a97
Merge pull request #1240 from TheIronBorn/patch-13
TheIronBorn Aug 4, 2022
2fab15d
fix stdsimd, add mask opt notes
TheIronBorn Aug 8, 2022
949d70f
fix doc test
TheIronBorn Aug 8, 2022
2c16a92
Merge pull request #1239 from TheIronBorn/std-simd
TheIronBorn Aug 10, 2022
d60ab38
optimize simd wmul
TheIronBorn Aug 11, 2022
9dd97b4
Merge pull request #1247 from rust-random/TheIronBorn-patch-1
TheIronBorn Aug 13, 2022
2569e9d
Mention disabling getrandom for wasm32-unknown-unknown in README (#1250)
golddranks Aug 14, 2022
db80c40
Bump MSRV to 1.38.0: fixes crossbeam-utils dev-dependency
dhardy Aug 3, 2022
6951164
Bump MSRV to 1.51.0: support const generics by default
dhardy Aug 3, 2022
fbf06ff
Optimized path of sample_efraimidis_spirakis is stable
dhardy Aug 5, 2022
b736407
Merge pull request #1246 from rust-random/work6
TheIronBorn Aug 14, 2022
89a1336
rand_core: update CHANGELOG for 0.6.4 (#1253)
dhardy Sep 15, 2022
2b4f00a
Update listed rand_core version number (#1254)
atouchet Sep 16, 2022
766c7ec
Doc: improve random, thread_rng, ThreadRng docs (#1257)
dhardy Sep 30, 2022
8d70f50
Clarify documentation of `choose_weighted(_mut)` mentioning accurate …
ISibboI Oct 10, 2022
23f8b29
clarify shuffle docs (#1259)
RalfJung Oct 11, 2022
387dd64
fix outdated choose_multiple_weighted docs (#1237)
TheIronBorn Nov 9, 2022
9720f11
Update GitHub Actions (#1263)
dhardy Nov 10, 2022
8339afc
Fix typo (#1264)
yaronf Nov 14, 2022
21131af
Remove redundant AsRef/AsMut bounds (#1207)
steffahn Nov 14, 2022
0aca902
SmallRng uses wrong seed_from_u64 implementation (#1203)
ironhaven Nov 14, 2022
7aa25d5
gh-pages action: add id-token write permission (#1265)
dhardy Nov 14, 2022
19169cb
Bump MSRV to 1.56 (Edition 2021) (#1269)
dhardy Dec 6, 2022
50b9a44
fill_via_chunks: mutate src on BE (small optimisation) (#1182)
dhardy Dec 7, 2022
0dddc2c
Add read_adapter to avoid dynamic dispatch (#1267)
SUPERCILEX Dec 7, 2022
81d7dc7
build: harden test.yml permissions (#1274)
sashashura Dec 9, 2022
fbd9586
Add Criterion as dev-dependency, fix CI for MSRV and minimal-versions…
dhardy Dec 11, 2022
b9e7d84
use partition_point in WeightedIndex (#1276)
TheIronBorn Dec 22, 2022
e97b5b6
Simpler and faster implementation of Floyd's F2 (#1277)
ciphergoth Jan 1, 2023
3107a54
Relax `Sized` bound on `Distribution<T> for &D` (#1278)
ChayimFriedman2 Jan 4, 2023
1e96eb4
Added new versions of choose and choose_stable (#1268)
wainwrightmark Jan 5, 2023
4bde8a0
Performance improvements for `shuffle` and `partial_shuffle` (#1272)
wainwrightmark Jan 8, 2023
ae4b48e
Add note about floating point weights in update_weights docs (#1280)
arya2 Feb 2, 2023
7d73990
Make `Uniform` constructors return a result (#1229)
vks Feb 6, 2023
f2e21db
Poisson returns -1 for small lambda (#1284)
tearne Feb 13, 2023
7c1e649
Rework CryptoRng (#1273)
newpavlov Feb 20, 2023
95b366f
Add uniform_float benchmark
dhardy Feb 21, 2023
5e5879a
Add direct impl of sample_single_inclusive for floats
dhardy Feb 21, 2023
7aedb36
Uniform for floats: extra tests
dhardy Feb 21, 2023
17c8b26
Don't run the random write test (#1294)
SUPERCILEX Feb 27, 2023
0f3eced
Poisson distribution falls into an infinite loop for parameter λ=∞ (#…
Thopic Feb 27, 2023
c44ac16
Merge branch 'master' into dirichlet-small-alpha
WarrenWeckesser Feb 28, 2023
4ecb35e
Refactor:
WarrenWeckesser Feb 28, 2023
7513e83
Convert `Dirichlet` from an `enum` to a `struct` containing an `enum`.
WarrenWeckesser Mar 1, 2023
030d2ad
Fix namespace qualifier for Serialize and Deserialize.
WarrenWeckesser Mar 1, 2023
0f5af66
Use const generics in Dirichlet (#1292)
Armavica Mar 18, 2023
8d98d45
Bench uniform_float: better grouping of plots
dhardy Mar 18, 2023
ee1653c
CI: benches require small_rng
dhardy Mar 18, 2023
145c6a2
Re-introduce Rng::gen_iter
dhardy Mar 23, 2023
22d0756
Uniform sampling: use Canon's method, Lemire's method (#1287)
dhardy Mar 24, 2023
7c97f9b
Merge master and fix conflicts.
WarrenWeckesser Mar 25, 2023
7fcb25f
Merge branch 'master' into dirichlet-small-alpha
WarrenWeckesser Mar 25, 2023
2225652
Copy-edit a comment and make it a doc comment.
WarrenWeckesser Mar 25, 2023
c6cca9c
StepRng: better documentation of outputs for other types (#1304)
dhardy Mar 26, 2023
c12db0b
Use an array for DirichletFromGamma.samplers
WarrenWeckesser Mar 30, 2023
7fcc5eb
Fix manual slice size calcuation (#1308)
schubart Apr 6, 2023
026292d
Merge branch 'master' into uniform-float
vks May 1, 2023
1464b88
Merge pull request #1209 from WarrenWeckesser/dirichlet-small-alpha
vks May 1, 2023
d4a2945
Merge pull request #1289 from dhardy/uniform-float
vks May 1, 2023
33a872a
Merge pull request #1305 from dhardy/gen_iter
vks May 1, 2023
a747b1d
fix feature typo (#1316)
ihciah Jun 2, 2023
51d27a9
ReseedingRng: fix doc comment on reseeding behavior after UNIX fork (…
LiosK Jun 4, 2023
0c4c6c0
impl TrustedLen is unsafe (#1318)
dhardy Jun 12, 2023
b593db6
Replace tab character with spaces in poisson.rs. (#1320)
WarrenWeckesser Jun 20, 2023
c7c6597
Fix infinite loop in Binomial distribution
benjamin-lieser Jul 4, 2023
dc8bc09
Update rand_distr/src/binomial.rs
benjamin-lieser Jul 4, 2023
c5af1f8
Fix spaces
benjamin-lieser Jul 5, 2023
a4739d8
Add test for infinite loop
benjamin-lieser Jul 5, 2023
c354b6a
Merge pull request #1325 from Unlikus/fix_infinite_loop_binv
vks Jul 14, 2023
ee80b41
Add `DistString` impl to `Uniform` and `Slice` (#1315)
aobatact Jul 14, 2023
176e736
Add `--generate-link-to-definition` option when building on docs.rs (…
GuillaumeGomez Jul 29, 2023
1b9d897
Add tests for `Uniform::try_from` with invalid ranges
vks Aug 9, 2023
dcefa4a
Implement Standard support for signed NonZero* types
elichai Aug 13, 2023
02b6eb0
Merge pull request #1331 from vks/try-from-panic
vks Aug 20, 2023
5b99004
Merge pull request #1332 from elichai/nz
vks Aug 20, 2023
f3dd0b8
fix partial_shuffle documentation (#1335)
TheIronBorn Aug 24, 2023
7d510d7
Improve doc of slice and iterator "choose" methods
dhardy Oct 10, 2023
e609fa9
Replace MIPS with PPC32
dhardy Oct 10, 2023
0c28eba
Improve doc of slice and iterator "choose" methods (#1343)
newpavlov Oct 10, 2023
e42c385
MSRV=1.60, use more permissive cfg on test
bjorn3 Oct 11, 2023
9a02c81
Simplify macro implementation for tuples (#1340)
Lucretiel Oct 11, 2023
5216f9a
Remove some unsafe code
joshlf Oct 29, 2023
d0499f0
Correcting method name in comment (#1350)
OldEnglishSheepdog Oct 30, 2023
d9a89c8
Add example for initializing a PCG RNG (#1347)
vks Oct 30, 2023
240cd43
Mention that `gen_range` may overflow for floats (#1337) (#1351)
vks Oct 31, 2023
870c679
Merge pull request #1349 from joshlf/remove-unsafe
vks Nov 2, 2023
ef89cbe
Support using std without getrandom or rand_chacha (#1354)
SUPERCILEX Nov 6, 2023
1924e12
Fix doc test to work without `rand` and `from_entropy`
vks Nov 27, 2023
1cc3f88
Update changelog
vks Nov 27, 2023
c427cff
Fix clippy warnings
vks Dec 14, 2023
e0292f3
Merge pull request #1363 from vks/clippy
vks Dec 14, 2023
14d036c
Add example for using rand (#1347)
vks Dec 14, 2023
3c2e82f
Merge pull request #1352 from vks/pcg-example
vks Dec 15, 2023
e9a27a8
Trap weighted index overflow (#1353)
dhardy Dec 30, 2023
1db3aa4
Replace SeedableRng impl for SmallRng with inherent fns (#1368)
dhardy Jan 5, 2024
1f4507a
Allow new warning on recent nightly versions (#1376)
bjorn3 Jan 26, 2024
f827c00
Add WeightedIndexTree to dist_randr (#1372)
xmakro Feb 8, 2024
88b2acc
Add dependabot (#1383)
oriontvv Feb 13, 2024
1ad2eec
Bump actions/configure-pages from 2 to 4 (#1389)
dependabot[bot] Feb 13, 2024
58add64
Bump actions/checkout from 3 to 4 (#1386)
dependabot[bot] Feb 13, 2024
e5a366d
Update zerocopy; trim unused methods (#1393)
dhardy Feb 13, 2024
97556c4
Bump actions/cache from 3 to 4 (#1385)
dependabot[bot] Feb 13, 2024
ef245fd
Update special requirement from 0.8.1 to 0.10.3 (#1384)
dependabot[bot] Feb 13, 2024
dba696e
Rename WeightedError → WeightError; add IndexedRandom, IndexedMutRand…
dhardy Feb 15, 2024
923bcf1
Update serde_with requirement from 1.14.0 to 3.6.1 (#1392)
dependabot[bot] Feb 18, 2024
2e13129
Bump actions upload-pages-artifact, deploy-pages (#1396)
dhardy Feb 18, 2024
8aa456c
Fix gh-pages.yml by deleting .lock file
dhardy Feb 18, 2024
5577003
Update CHANGELOGs and prepare rand 0.9.0-alpha.0 (#1395)
dhardy Feb 18, 2024
b1427c6
Disable rand_pcg's dev dependency on rand (#1397)
dhardy Feb 18, 2024
7ff0fc9
Add path for benchmark (#1398)
dhardy Feb 18, 2024
304048b
Fix redundant import warnings (#1405)
MichaelOwenDyer Mar 7, 2024
7ed92ee
Add .choices() method to the Slice distribution (#1402)
JustusFluegel Mar 7, 2024
4ed1b20
chore: fix typos (#1407)
acceptacross Mar 11, 2024
769bcb6
Document more crate feature usage (#1411)
TheIronBorn Mar 18, 2024
be75bf5
Update zerocopy requirement from =0.8.0-alpha.5 to =0.8.0-alpha.6 (#1…
dependabot[bot] Mar 18, 2024
b45e892
Update average requirement from 0.13 to 0.14 (#1388)
dependabot[bot] Mar 18, 2024
4cbbb34
Remove automatic (delayed) reseed-on-fork (#1379)
dhardy Mar 18, 2024
1015e70
Prepare 0.9.0-alpha.1 (#1413)
dhardy Mar 18, 2024
a457907
Use Simd::wrapping_neg (#1414)
dhardy Mar 22, 2024
2eaf854
Bump the MSRV to 1.61.0 (#1416)
dhardy Mar 22, 2024
0e626c7
Cleaner README, remove MSRV shields (#1417)
dhardy Mar 25, 2024
0518975
Update average requirement from 0.14 to 0.15 (#1426)
dependabot[bot] Apr 2, 2024
7b37c15
Add methods weight, weights, and total_weight to weighted_index.rs (#…
MichaelOwenDyer Apr 2, 2024
2f6fee9
Bump actions/configure-pages from 4 to 5 (#1427)
dependabot[bot] Apr 2, 2024
2f14aec
Put macro `x86_intrinsic_impl` behind x86 configuration guard
MichaelOwenDyer Apr 3, 2024
21a1ce1
Merge pull request #1431 from MichaelOwenDyer/put-x86-macro-behind-x8…
MichaelOwenDyer Apr 4, 2024
bca078e
Optimize imports (#1430)
MichaelOwenDyer Apr 5, 2024
eae3228
rand_distr/std_math: add note regarding other dependents (#1421)
dhardy Apr 10, 2024
d42daab
Add "bug report" issue template (#1436)
dhardy Apr 10, 2024
d507f7e
Upgrade criterion
vks Jul 28, 2023
6f917e1
Move rand benches to their own crate
vks Apr 26, 2024
9855f37
Pin rayon and rayon-core to support MSRV 1.61
vks Apr 26, 2024
0935356
Fix benches test in pipeline
vks Apr 26, 2024
13620d9
Test feature serde1 on rand_chacha
dhardy Apr 27, 2024
f6ac90f
Updated Cargo.lock.msrv
dhardy Apr 27, 2024
47d0b54
Remove pin on Rayon versions
dhardy Apr 27, 2024
3c0661b
Rename rand_benches -> benches
dhardy Apr 27, 2024
24b84a0
Move Criterion benches to benches/src
dhardy Apr 27, 2024
e55b1f6
Merge rand_distr/benches into benches
dhardy Apr 27, 2024
75a233b
Add note to CHANGELOG
dhardy Apr 27, 2024
6389320
Update Cargo.lock.msrv again
dhardy Apr 27, 2024
bf0301b
Fix test.yml
dhardy Apr 27, 2024
089d993
Merge pull request #1439 from dhardy/upgrade-criterion
vks Apr 29, 2024
4f8257a
Rename `Rng::gen` to `Rng::random` (#1438)
vks Apr 29, 2024
a2375dc
Add #[track_caller] to methods which panic (#1442)
josephlr May 5, 2024
b10172f
Make fn WeightedTreeIndex::try_sample public
xmakro May 7, 2024
1f81878
Use zerocopy 0.7.33, not 0.8.0-alpha (#1446)
joshlf May 7, 2024
fba5521
Add `TryRngCore` and `TryCryptoRng` traits (#1424)
newpavlov May 8, 2024
e937769
Update Panic documentation and #[track_caller] (#1447)
josephlr May 8, 2024
1b762b2
Apply rustfmt and fix Clippy warnings (#1448)
newpavlov May 9, 2024
890ad8b
Rename `doc_cfg` to `docsrs` and use `doc_auto_cfg` (#1450)
newpavlov May 10, 2024
10a1fa4
Tweak docs CI job (#1451)
newpavlov May 11, 2024
defeb0c
Revise crate doc for rand_pcg, rand_chacha (#1454)
dhardy May 23, 2024
ba7f515
Revise RNG docs; enable small_rng by default (#1455)
dhardy May 23, 2024
6a46506
Fix benches CI job (#1456)
newpavlov May 24, 2024
ef75e56
Fix Nightly Clippy lints (#1457)
newpavlov May 25, 2024
ca9e119
Add IndexedRandom::choose_multiple_array, index::sample_array (#1453)
dhardy Jun 4, 2024
17746a1
Add distribution plots to `rand_distr` documentation (#1434)
MichaelOwenDyer Jul 8, 2024
763dbc5
`rand_distr`: Rename Zeta parameter from `a` to `s` (#1466)
MichaelOwenDyer Jul 10, 2024
d17ce4e
rand_distr: split gamma module (#1464)
dhardy Jul 11, 2024
2584f48
Fix pert for mode approx eq mean; use builder pattern (#1452)
dhardy Jul 16, 2024
1e381d1
UniformFloat: allow inclusion of high in all cases (#1462)
dhardy Jul 16, 2024
e4874a6
Fix some typos. (#1472)
waywardmonkeys Jul 20, 2024
f3aab23
Fix `clippy::doc_markdown` warnings. (#1474)
waywardmonkeys Jul 20, 2024
605476c
Portability fixes (#1469)
dhardy Jul 23, 2024
2d5948d
rand::distributions -> distr; split uniform module (#1470)
dhardy Jul 23, 2024
f7bbcca
Rename `serde1` feature to `serde`. (#1477)
waywardmonkeys Jul 26, 2024
2833c78
Document Rng::fill, random differences
dhardy Jul 28, 2024
79f1b0f
Document known issues: #1378, #1312, #1476.
dhardy Aug 12, 2024
9e030aa
Migrate remaining benchmarks to Criterion (#1490)
dhardy Sep 6, 2024
71c53be
Require SeedableRng::Seed to impl Clone + AsRef (#1491)
clarfonthey Sep 9, 2024
ef052ec
No usize except uniform (#1487)
dhardy Sep 9, 2024
f263820
Poisson: split Knuth/Rejection methods (#1493)
dhardy Sep 23, 2024
e2092e9
Poisson u64 sampling (#1498)
benjamin-lieser Oct 1, 2024
66b11eb
Rename gen_iter → random_iter, misc.. (#1500)
dhardy Oct 1, 2024
bc33411
Make sure BTPE is not entered when np < 10 (#1484)
benjamin-lieser Oct 3, 2024
d2eb51b
Remove some unsafe, update to zerocopy 0.8.0 (#1502)
joshlf Oct 7, 2024
d1f961c
Improve SmallRng initialization performance (#1482)
arthurprs Oct 7, 2024
9c2787d
Cdf testing with Kolmogorov Smirnov (#1494)
benjamin-lieser Oct 8, 2024
0fba940
rand_core: add blanket impl of TryRngCore for RngCore (#1499)
newpavlov Oct 9, 2024
f5185d9
thread_rng() → rand::rng() (#1506)
dhardy Oct 11, 2024
695fc9a
Fix new Clippy lints (#1511)
newpavlov Oct 15, 2024
9d57b87
Weibull doc: add PDF and warning against small k (#1509)
benjamin-lieser Oct 16, 2024
8225d94
Rng renames: gen_ → random_ (#1505)
dhardy Oct 16, 2024
8b455dd
Add `p()` for `Bernoulli` (#1481)
marcpabst Oct 17, 2024
0d32093
Use explicit features rather than implicit. (#1473)
waywardmonkeys Oct 17, 2024
1aa9a69
Add more Kolmogorov–Smirnov test (#1504)
JamboChen Oct 17, 2024
0c36c6c
Remove u64 support for Poisson (#1517)
dhardy Oct 24, 2024
24b9cc3
README: rand is not a crypto library (#1514)
dhardy Oct 28, 2024
585b29f
Add top-level helper functions (#1488)
oconnor663 Oct 31, 2024
ad67294
Zipf: let n have type F (#1518)
dhardy Nov 12, 2024
7fe350c
Hypergeo fix (#1510)
benjamin-lieser Nov 13, 2024
e85c923
Move KS tests (#1525)
benjamin-lieser Nov 18, 2024
3f984dd
Rename `Standard` → `StandardUniform` (#1526)
dhardy Nov 18, 2024
935a3e3
Remove rng parameter of ReseedingRng::new (#1533)
dhardy Nov 21, 2024
4807e26
rand_chacha: remove conditional compilation around using core (#1534)
ComputerDruid Nov 22, 2024
c68463c
Remove SmallRng::from_thread_rng (#1532)
dhardy Nov 22, 2024
c1f865f
Bump the MSRV to 1.63.0 (#1536)
dhardy Nov 25, 2024
0ff946c
Make getrandom a non-pub dep; rename feature to os_rng (#1537)
dhardy Nov 26, 2024
bf9d429
Add KS tests for weighted sampling; use A-ExpJ alg with log-keys (#1530)
dhardy Nov 26, 2024
3fac49f
Prepare 0.9.0-beta.0 (#1535)
dhardy Nov 26, 2024
b879689
Adjust GH Actions (#1538)
dhardy Nov 27, 2024
88c310b
Fix docs.rs build options (#1539)
dhardy Nov 27, 2024
9f05e22
Update: getrandom v0.3.0 rc.0 (#1541)
dhardy Nov 30, 2024
c681dfc
Create FUNDING.yml
dhardy Dec 19, 2024
afa24e4
Fix test status badges (#1544)
atouchet Dec 26, 2024
16eb7de
Add the `thread_rng` feature flag (#1547)
dhardy Jan 9, 2025
b4b1eb7
Re-org with distr::slice, distr::weighted modules (#1548)
dhardy Jan 14, 2025
34da321
Enable `stdarch_x86_avx512` for cpu has `avx512bw` (#1551)
serendipity-crypto Jan 14, 2025
96f8df6
Prepare 0.9.0 release (#1558)
dhardy Jan 27, 2025
e06370c
Replaces the Poisson rejection method implementation (#1560)
JamboChen Jan 27, 2025
664fb3c
Mention removal of CryptoRngCore (#1562)
dhardy Jan 28, 2025
22ba98f
Consistent capitalization for deprecated function names in documentat…
yttersian Jan 28, 2025
b36dc2a
Update rand_core version number in Readme (#1569)
atouchet Jan 29, 2025
c01aee7
Fix some links (#1571)
atouchet Jan 30, 2025
bfd1826
SeedableRng docs: add note on (lack of) reproducibility (#1572)
dhardy Jan 31, 2025
2677c49
Revise "not a crypto library" policy and SECURITY.md (#1565)
dhardy Feb 6, 2025
0bc3f65
Move rand distr (#1577)
benjamin-lieser Feb 6, 2025
e0a70fd
Change to use `array::from_fn` in `Distribution<[T; N]> for StandardU…
sorairolake Feb 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: dhardy
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Bug report
about: Something doesn't work as expected
title: ''
labels: X-bug
assignees: ''

---

## Summary

A clear and concise description of what the bug is.

What behaviour is expected, and why?

## Code sample

```rust
// Code demonstrating the problem
```
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/suggest-a-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Suggest a change
about: Describe this issue template's purpose here.
title: 'CHANGE: <summary>'
labels: ''
assignees: ''

---

A change request is considered a (small) Request-For-Comment, and requires a concrete proposal and motivation.

## Summary

How does this affect the API / end-user? (Include API-breaking changes, value-breaking changes and API additions.)

## Details

What changes does this require internally?

## Motivation

What is the motivation for this change?

Since every change has a cost (even if just API churn or extra code size), every change must have sufficient motivation. This is arguably the most important part of the RFC.

## Alternatives

Which alternatives might be considered, and why or why not?
7 changes: 7 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- [ ] Added a `CHANGELOG.md` entry

# Summary

# Motivation

# Details
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "monthly"
open-pull-requests-limit: 10
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
42 changes: 42 additions & 0 deletions .github/workflows/benches.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Benches

on:
push:
branches: [ master ]
paths-ignore:
- "**.md"
- "examples/**"
pull_request:
branches: [ master ]
paths-ignore:
- "**.md"
- "examples/**"

defaults:
run:
working-directory: ./benches

jobs:
clippy-fmt:
name: "Benches: Check Clippy and rustfmt"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy, rustfmt
- name: Rustfmt
run: cargo fmt -- --check
- name: Clippy
run: cargo clippy --all-targets -- -D warnings
benches:
name: "Benches: Test"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
- name: Test
run: RUSTFLAGS=-Dwarnings cargo test --benches
47 changes: 47 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: gh-pages

permissions:
contents: read
pages: write
id-token: write

on:
push:
branches:
- master

jobs:
deploy:
name: GH-pages documentation
runs-on: ubuntu-latest
environment:
name: github-pages
url: https://rust-random.github.io/rand/

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly

- name: Build docs
env:
RUSTDOCFLAGS: --cfg doc_cfg
# --all builds all crates, but with default features for other crates (okay in this case)
run: |
cargo doc --all --all-features --no-deps
cp utils/redirect.html target/doc/index.html
rm target/doc/.lock

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './target/doc'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
210 changes: 210 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
name: Main tests

on:
push:
branches: [ master, '0.[0-9]+' ]
paths-ignore:
- "**.md"
- "benches/**"
pull_request:
branches: [ master, '0.[0-9]+' ]
paths-ignore:
- "**.md"
- "benches/**"

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
clippy-fmt:
name: Check Clippy and rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy, rustfmt
- name: Check Clippy
run: cargo clippy --workspace -- -D warnings
- name: Check rustfmt
run: cargo fmt --all -- --check

check-doc:
name: Check doc
runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: "-Dwarnings --cfg docsrs -Zunstable-options --generate-link-to-definition"
steps:
- uses: actions/checkout@v4
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
- name: rand
run: cargo doc --all-features --no-deps
- name: rand_core
run: cargo doc --all-features --package rand_core --no-deps
- name: rand_chacha
run: cargo doc --all-features --package rand_chacha --no-deps
- name: rand_pcg
run: cargo doc --all-features --package rand_pcg --no-deps

test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
toolchain: stable
- os: macos-latest
target: x86_64-apple-darwin
toolchain: stable
# TODO: also aarch64 / M1
- os: windows-latest
target: x86_64-pc-windows-gnu
toolchain: stable
- os: windows-latest
target: x86_64-pc-windows-msvc
toolchain: beta
# Test both windows-gnu and windows-msvc; use beta rust on one
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
variant: MSRV
toolchain: 1.63.0
- os: ubuntu-latest
deps: sudo apt-get update ; sudo apt install gcc-multilib
target: i686-unknown-linux-gnu
toolchain: nightly
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
toolchain: nightly
variant: minimal_versions

steps:
- uses: actions/checkout@v4
- name: MSRV
if: ${{ matrix.variant == 'MSRV' }}
run: cp Cargo.lock.msrv Cargo.lock
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
target: ${{ matrix.target }}
toolchain: ${{ matrix.toolchain }}
- run: ${{ matrix.deps }}
- name: Maybe minimal versions
if: ${{ matrix.variant == 'minimal_versions' }}
run: |
cargo generate-lockfile -Z minimal-versions
- name: Maybe nightly
if: ${{ matrix.toolchain == 'nightly' }}
run: |
cargo test --target ${{ matrix.target }} --features=nightly
cargo test --target ${{ matrix.target }} --all-features
cargo test --target ${{ matrix.target }} --lib --tests --no-default-features
- name: Test rand
run: |
cargo test --target ${{ matrix.target }} --lib --tests --no-default-features
cargo build --target ${{ matrix.target }} --no-default-features --features alloc,os_rng,small_rng,unbiased
cargo test --target ${{ matrix.target }} --lib --tests --no-default-features --features=alloc,os_rng,small_rng
cargo test --target ${{ matrix.target }} --examples
- name: Test rand (all stable features)
run: |
cargo test --target ${{ matrix.target }} --features=serde,log,small_rng
- name: Test rand_core
run: |
cargo test --target ${{ matrix.target }} --manifest-path rand_core/Cargo.toml
cargo test --target ${{ matrix.target }} --manifest-path rand_core/Cargo.toml --no-default-features
cargo test --target ${{ matrix.target }} --manifest-path rand_core/Cargo.toml --no-default-features --features=os_rng
- name: Test rand_pcg
run: cargo test --target ${{ matrix.target }} --manifest-path rand_pcg/Cargo.toml --features=serde
- name: Test rand_chacha
run: cargo test --target ${{ matrix.target }} --manifest-path rand_chacha/Cargo.toml --features=serde

test-cross:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: powerpc-unknown-linux-gnu
toolchain: stable

steps:
- uses: actions/checkout@v4
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
target: ${{ matrix.target }}
toolchain: ${{ matrix.toolchain }}
- name: Cache cargo plugins
uses: actions/cache@v4
with:
path: ~/.cargo/bin/
key: ${{ runner.os }}-cargo-plugins
- name: Install cross
run: cargo install cross || true
- name: Test
run: |
# all stable features:
cross test --no-fail-fast --target ${{ matrix.target }} --features=serde,log,small_rng
cross test --no-fail-fast --target ${{ matrix.target }} --examples
cross test --no-fail-fast --target ${{ matrix.target }} --manifest-path rand_core/Cargo.toml
cross test --no-fail-fast --target ${{ matrix.target }} --manifest-path rand_pcg/Cargo.toml --features=serde
cross test --no-fail-fast --target ${{ matrix.target }} --manifest-path rand_chacha/Cargo.toml

test-miri:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install toolchain
run: |
rustup toolchain install nightly --component miri
rustup override set nightly
cargo miri setup
- name: Test rand
run: |
cargo miri test --no-default-features --lib --tests
cargo miri test --features=log,small_rng
cargo miri test --manifest-path rand_core/Cargo.toml
cargo miri test --manifest-path rand_core/Cargo.toml --features=serde
cargo miri test --manifest-path rand_core/Cargo.toml --no-default-features
cargo miri test --manifest-path rand_pcg/Cargo.toml --features=serde
cargo miri test --manifest-path rand_chacha/Cargo.toml --no-default-features

test-no-std:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
target: thumbv6m-none-eabi
- name: Build top-level only
run: cargo build --target=thumbv6m-none-eabi --no-default-features

# Disabled due to lack of known working compiler versions (not older than our MSRV)
# test-avr:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Install toolchain
# uses: dtolnay/rust-toolchain@nightly
# with:
# components: rust-src
# - name: Build top-level only
# run: cargo build -Z build-std=core --target=avr-unknown-gnu-atmega328 --no-default-features

test-ios:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
target: aarch64-apple-ios
- name: Build top-level only
run: cargo build --target=aarch64-apple-ios
Loading