Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
976 commits
Select commit Hold shift + click to select a range
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
039e740
benches/uniform: revise sample! macro for SIMD
dhardy Jan 14, 2025
5ec6390
benches/uniform: add SIMD benches
dhardy 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
7a14dfe
Implement `fill_via_chunks` without using zerocopy or `unsafe`.
briansmith Feb 3, 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
49d76cd
rename extract to extract_lane (#1586)
benjamin-lieser Feb 12, 2025
06b1642
Remove unnecessary underscore from `impl<T, const N: usize> Distribut…
sorairolake Feb 13, 2025
8929123
Add `Alphabetic` distribution (#1587)
1Git2Clone Feb 15, 2025
6a06056
rand_core: introduce an UnwrapMut wrapper (#1589)
baloo Feb 16, 2025
ec6d5c0
Prepare rand_core v0.9.1 (#1591)
dhardy Feb 16, 2025
775b05b
Relax `Sized` requirements for blanket impls (#1593)
fjarri Feb 20, 2025
975f602
fixup clippy 1.85 warnings
baloo Feb 20, 2025
e0eb2ee
rand_core: implement reborrow for `UnwrapMut`
baloo Feb 18, 2025
ee1d96f
rand_core: implement reborrow for `UnwrapMut` (#1595)
dhardy Feb 21, 2025
db2b1e0
rand: re-export `rand_core`
baloo Feb 22, 2025
c7fe1c4
rand: re-export `rand_core` (#1604)
dhardy Feb 22, 2025
99fabd2
Prepare rand_core 0.9.2
baloo Feb 22, 2025
d3dd415
Prepare rand_core 0.9.2 (#1605)
dhardy Feb 22, 2025
03ce3fe
Use @josephlr's suggestion
dhardy Feb 25, 2025
44f905c
Deprecate fns fill_via_u{32|64}_chunks
dhardy Feb 25, 2025
0680e6d
Merge with master and update CHANGELOG
dhardy Feb 25, 2025
7aa2637
Add SIMD benches (#1553)
dhardy Feb 25, 2025
270f6b3
Impl fill_via_chunks without using zerocopy or unsafe (#1607)
dhardy Feb 28, 2025
f8d416e
Prepare rand_core v0.9.3
dhardy Feb 28, 2025
340849e
Prepare rand_core v0.9.3 (#1608)
dhardy Mar 1, 2025
9c953d4
Update rand_core version number in Readme (#1613)
atouchet Mar 9, 2025
17fea2b
Add 'unbiased' to 'Crate Features' section
Raymi306 Mar 15, 2025
afcfbb2
Add 'unbiased' to 'Crate Features' section (#1616)
dhardy Mar 15, 2025
7808f4e
Update README.md Default Features (#1618)
Raymi306 Mar 22, 2025
5f5b580
Allow fn choose_multiple_weighted to return fewer than amount elts (#…
dhardy Apr 9, 2025
d468501
Fix documentation of fns rand_core::le::read_u*_into (#1626)
dhardy Apr 11, 2025
f812984
readme: replace relative links with absolute (#1627)
hashcatHitman Apr 16, 2025
3057641
Remove zerocopy from rand (#1579)
dhardy Apr 16, 2025
db993ec
Prepare rand v0.9.1 (#1629)
dhardy Apr 17, 2025
a6e217f
Update statrs link (#1630)
atouchet Apr 18, 2025
86262ac
Deprecate rand::rngs::mock module and StepRng (#1634)
dhardy Apr 25, 2025
204084a
Fix: Remove accidental editor swap file (#1636)
mingulov May 19, 2025
0c955c5
Add some tests for BlockRng, BlockRng64 and Xoshiro RNGs (#1639)
AbeZbm May 28, 2025
97c3e2f
rand_core: relax requirements on the param for `SeedableRng`
baloo May 31, 2025
6cb75ee
Make UniformUsize serializable (#1646)
aleb Jul 17, 2025
031a1f5
`examples/print-next.rs` (#1647)
dhardy Jul 20, 2025
98473ee
Prepare rand 0.9.2 (#1648)
dhardy Jul 20, 2025
1291ef1
pub use Xoshiro{128,256}PlusPlus (#1649)
dhardy Jul 30, 2025
14c9fd1
Remove impl_fill_each: Fill for [bool], [char], [f32], [f64]
dhardy Jul 30, 2025
e236d01
Let trait Fill be implemented for element types, not sliceable types
dhardy Jul 30, 2025
2f7f83e
Test that Fill may be implemented for externally-defined types
dhardy Aug 7, 2025
8b6d4f9
Revise impl_fill macro
dhardy Aug 7, 2025
a1faaeb
CHANGELOG
dhardy Aug 7, 2025
ead83fd
Let `trait Fill` be implemented for element types (#1652)
dhardy Aug 12, 2025
07a0208
rand_core: relax requirements on the param for `SeedableRng` (#1641)
dhardy Aug 12, 2025
cd640b1
Add test for rand_core MSRV
dhardy Sep 3, 2025
081e9da
Bump the MSRV to 1.85
dhardy Aug 12, 2025
57eaa4d
Migrate to edition 2024
dhardy Aug 12, 2025
0006804
Update formatting
dhardy Aug 12, 2025
052b80f
Update to Edition 2024, MSRV 1.85 (#1653)
dhardy Sep 4, 2025
f9d37d6
StdRng: test state after construction
dhardy Sep 3, 2025
37d5ad2
Added test vectors for StdRng (Strombergson 2013)
hpenne Jun 14, 2025
75c06da
Add StdRng test setting the counter
dhardy Sep 3, 2025
0c53ff5
Remove rng_state test
dhardy Sep 3, 2025
2f688d4
Convert test vectors to u128 arrays
dhardy Sep 4, 2025
ff5e2b4
Extend counter wrap test
dhardy Sep 4, 2025
e69f52a
Rename fns IndexedRandom::choose_multiple* -> sample*
dhardy Apr 19, 2025
74d53b0
Rename fns IteratorRandom::choose_multiple* -> sample*
dhardy Apr 19, 2025
55db818
Add deprecated fn wrappers
dhardy Apr 19, 2025
d2ae13e
Rename struct SliceChooseIter -> IndexedSamples
dhardy Apr 19, 2025
107db7e
Add fns IndexedRandom::choose_iter, choose_weighted_iter
dhardy Apr 19, 2025
198475a
CHANGELOG
dhardy Apr 19, 2025
34b2e45
Rename fns choose_multiple* → sample*; add choose*_iter (#1632)
dhardy Sep 4, 2025
d28a658
Added test vectors for StdRng, verified using rand_chacha. (#1654)
dhardy Sep 8, 2025
52b1bea
Replaced rand_chacha with chacha20.
hpenne Jun 14, 2025
ce3f8dc
Added entry to CHANGELOG.md
hpenne Jun 15, 2025
e41e428
Added fix for multiple versions of rand_core to benches.
hpenne Jun 15, 2025
0c201cd
Fixed some breakage due to upstream API changes.
hpenne Sep 8, 2025
9a7a59c
Updated to latest chacha20 release candidate. Removed some int conver…
hpenne Sep 8, 2025
9ee24b9
Added PR number to the CHANGELOG.md entry. Removed a superfluous u64:…
hpenne Sep 9, 2025
4490b41
Updated chacha20 to 0.10.0-rc.2, and removed the "legacy" feature and…
hpenne Sep 9, 2025
4afc333
Replace rand_chacha dependency with chacha20 (#1642)
dhardy Sep 10, 2025
47e9767
chacha feature, pub use ChaCha*Rng in rand/rngs
dhardy Sep 10, 2025
9b48cd4
CHANGELOG entry
dhardy Sep 10, 2025
da946be
chacha feature, pub use ChaCha*Rng in rand/rngs (#1659)
dhardy Sep 10, 2025
8a3d963
Prepare 0.10.0-rc.0
dhardy Sep 10, 2025
54ea272
Prepare 0.10.0-rc.0 (#1660)
dhardy Sep 11, 2025
4cbd428
chore: Replace `doc_auto_cfg` with `doc_cfg` (#1664)
sorairolake Oct 1, 2025
1b83503
Remove deprecated fns impls::fill_via_u{32,64}_chunks
dhardy Oct 20, 2025
ebff14a
Move impls contents to le
dhardy Oct 20, 2025
1446cb6
Update doc: le
dhardy Oct 20, 2025
e1f000d
Update doc: RngCore
dhardy Oct 20, 2025
1a0c861
Update CHANGELOG
dhardy Oct 20, 2025
dfd22ca
Remove rand::rngs::mock
dhardy Oct 20, 2025
22fa1ef
Update other uses of rand_core::impls
dhardy Oct 20, 2025
d2bb1c4
Move rand_core::impls::* to le (#1667)
dhardy Oct 20, 2025
aba9523
Remove CI test and Cargo.lock.msrv for rand_core with Rust 1.63.0
dhardy Oct 20, 2025
d812da4
Bump rand_core MSRV to 1.85.0 and Edition to 2024
dhardy Oct 20, 2025
679697d
Edition-related Clippy fix
dhardy Oct 20, 2025
e99a339
Bump MSRV and Edition for `rand_core` (#1668)
dhardy Oct 20, 2025
234c0ec
Remove fn read_adapter, rename RngReadAdapter -> RngReader and make p…
dhardy Oct 20, 2025
1d76be5
Let RngReader take R by value
dhardy Oct 20, 2025
72e9566
Bump MSRV and Edition for `rand_chacha` (#1671)
newpavlov Oct 20, 2025
703500a
Use --ignore-rust-version on non-MSRV builds (#1672)
dhardy Oct 21, 2025
8c5840f
Move RngReader to rand
dhardy Oct 21, 2025
140a6d4
Schedule weekly CI runs (#1673)
dhardy Oct 21, 2025
26ffd25
CHANGELOG
dhardy Oct 21, 2025
d0eef34
Move fn read_adapter out of trait TryRngCore to rand (#1669)
dhardy Oct 21, 2025
a8208d4
Fix type of RawOsError on UEFI targets (#1665)
usamoi Oct 22, 2025
7e9de12
rand_pcg: remove feature os_rng
dhardy Oct 20, 2025
abf5e4d
rand_chacha: remove feature os_rng (requires rand dev-dependency)
dhardy Oct 20, 2025
723d1d9
Update SECURITY.md
dhardy Oct 20, 2025
895c2c9
Remove fns {try_,}from_os_rng
dhardy Oct 20, 2025
908c584
Move OsRng definition to rand::rngs
dhardy Oct 20, 2025
fc7bf7f
CHANGELOGs
dhardy Oct 20, 2025
1d3235c
Update CI for rand_core
dhardy Oct 21, 2025
5d07c2d
Move OsRng down to rand (#1674)
dhardy Oct 30, 2025
e9c799c
Remove Clone for StdRng
dhardy Oct 30, 2025
4cc9891
Remove Clone support for ReseedingRng
dhardy Oct 30, 2025
1422700
CHANGELOG
dhardy Oct 30, 2025
5fce5ec
Remove Clone for StdRng, new bound for ReseedingRng (#1677)
dhardy Oct 30, 2025
fbe1712
Remove rand_core
dhardy Nov 4, 2025
3444da7
Fix up Cargo.tomls
dhardy Nov 4, 2025
b5188a0
Bump rand_core, chacha20 versions
dhardy Nov 4, 2025
84da23d
Bump local crate versions
dhardy Nov 4, 2025
e24a3aa
Remove rand_core CI tests
dhardy Nov 4, 2025
6c2fcc1
Add links to rand_chacha CHANGELOG
dhardy Nov 4, 2025
f05c2aa
Add links to rand_pcg CHANGELOG
dhardy Nov 4, 2025
cb578fb
Add missing entries to rand CHANGELOG
dhardy Nov 4, 2025
0ead7bc
Add links to rand CHANGELOG
dhardy Nov 4, 2025
703f7c2
CHANGELOG: use hyphen not m-dash
dhardy Nov 4, 2025
3948e19
Remove rand_core and use as external dependency; bump versions to 0.1…
dhardy Nov 4, 2025
0b6d218
Remove dead link to rand_core changelog
allan2 Nov 4, 2025
6c8eecb
Update link
allan2 Nov 5, 2025
737be86
Update rand_core changelog link (#1680)
dhardy Nov 5, 2025
fdacad9
Update CHANGELOG format: add links (#1679)
dhardy Nov 6, 2025
a7b1d28
Cargo.toml: bump `chacha20` to v0.10.0-rc.5
tarcieri Nov 6, 2025
b4d90bf
Cargo.toml: bump `chacha20` to v0.10.0-rc.5 (#1683)
dhardy Nov 8, 2025
e0fd7f8
Bump rand for 0.10.0-rc.5
dhardy Nov 8, 2025
2eb1bbe
Bump rand for 0.10.0-rc.5 (#1684)
dhardy Nov 8, 2025
1c00b3d
Drop dependency on rand_core/serde
dhardy Nov 28, 2025
a2a1e09
Drop dependency on rand_core/serde (#1689)
dhardy Nov 30, 2025
2238cb9
Remove CI for gh-pages deployment
dhardy Dec 5, 2025
b72dac1
Remove links to rust-random.github.io/rand
dhardy Dec 5, 2025
17b12b1
Remove local docs (#1692)
dhardy Dec 5, 2025
a559582
Use postcard instead of bincode in tests
valadaptive Dec 15, 2025
1e08cf5
Add to CHANGELOG
valadaptive Dec 15, 2025
8336923
Use postcard instead of bincode in tests (#1693)
dhardy Dec 16, 2025
f5dc304
IteratorRandom::sample: allow large "amount"
stepancheg Dec 20, 2025
20199ed
Cargo.lock: pin dependencies
baloo Dec 24, 2025
8cb6ab0
Cargo.lock: pin dependencies (#1699)
dhardy Dec 27, 2025
d782da8
Add Cargo.lock automation (copied from getrandom)
dhardy Dec 27, 2025
6548170
Update rand_core, getrandom and chacha20
dhardy Dec 23, 2025
9b18dda
Use getrandom::SysRng
dhardy Dec 23, 2025
bf57bbc
Rename OsRng -> SysRng
dhardy Dec 23, 2025
25402ef
Update rand_pcg
dhardy Nov 30, 2025
66137b1
Update rand_chacha
dhardy Dec 23, 2025
d78703e
Update rand
dhardy Dec 23, 2025
c370309
Update getrandom, rand_core; rename `OsRng` → `SysRng` (#1697)
dhardy Dec 28, 2025
c9f3fea
Bump actions/cache from 4 to 5
dependabot[bot] Dec 28, 2025
0cf714e
Bump actions/checkout from 4 to 6
dependabot[bot] Dec 28, 2025
4262e72
Bump the all-deps group with 4 updates
dependabot[bot] Dec 28, 2025
127c1d2
Bump actions/cache from 4 to 5 (#1702)
dhardy Dec 28, 2025
d86542a
Bump actions/checkout from 4 to 6 (#1703)
dhardy Dec 28, 2025
ac856a6
Bump the all-deps group with 4 updates (#1704)
dhardy Dec 28, 2025
51ebbd8
Merge branch 'master' into iter-sample
dhardy Dec 28, 2025
ff07ec2
IteratorRandom::sample: allow large "amount" (#1695)
dhardy Dec 28, 2025
840e47b
Bump the all-deps group with 2 updates
dependabot[bot] Dec 30, 2025
75fe38f
Bump the all-deps group with 2 updates (#1707)
dhardy Dec 31, 2025
f85bca9
Bump versions to 0.10.0-rc.6
dhardy Jan 4, 2026
7a14a77
Bump versions to 0.10.0-rc.6 (#1708)
dhardy Jan 4, 2026
2c096d5
Bump the all-deps group with 6 updates
dependabot[bot] Jan 6, 2026
da2211b
Bump the all-deps group with 6 updates (#1709)
dhardy Jan 7, 2026
6a2faaa
Bump the all-deps group with 3 updates
dependabot[bot] Jan 7, 2026
f356bba
Bump the all-deps group with 3 updates (#1710)
dhardy Jan 13, 2026
9c99d93
Update rand_core to 0.10.0-rc-4 (#1712)
dhardy Jan 20, 2026
f947afd
Bump the all-deps group across 1 directory with 3 updates (#1713)
dependabot[bot] Jan 20, 2026
a11fc4e
Prepare rand v0.10.0-rc.7 (#1714)
dhardy Jan 20, 2026
6e80534
Change glob pattern for tags used by release.yml (#1715)
dhardy Jan 20, 2026
8ee82f4
Remove rand_chacha (#1658)
dhardy Jan 23, 2026
7a81944
ci: tweak Clippy job (#1716)
newpavlov Jan 23, 2026
85161db
Rename `Rng` => `RngExt`; bump `rand_core` to v0.10.0-rc-6
tarcieri Jan 24, 2026
15b8880
Rename `Rng` => `RngExt`; bump `rand_core` to v0.10.0-rc-6 (#1717)
dhardy Jan 26, 2026
df87c2e
Change glob expression used in release.yml
dhardy Jan 26, 2026
73ca4f0
Change glob expression used in release.yml (#1718)
dhardy Jan 26, 2026
710e260
Bump the all-deps group with 3 updates
dependabot[bot] Jan 27, 2026
47455a0
Bump the all-deps group with 3 updates (#1719)
dhardy Jan 28, 2026
b63093a
Use dependabot to update benches's Cargo.lock
dhardy Jan 28, 2026
5a34c55
Use dependabot to update benches's Cargo.lock (#1723)
dhardy Jan 28, 2026
daa38ac
Bump the all-deps group in /benches with 11 updates
dependabot[bot] Jan 28, 2026
a4c9a8e
Bump the all-deps group in /benches with 11 updates (#1724)
dhardy Jan 28, 2026
c4967be
Update for SIMD changes
dhardy Feb 1, 2026
eaf2bef
Update for SIMD changes (#1725)
dhardy Feb 2, 2026
46153ea
Make ReseedingRng private
dhardy Jan 28, 2026
b27f54c
Inline ReseedingRng methods
dhardy Jan 28, 2026
d264838
Fix reseeding source to SysRng
dhardy Jan 28, 2026
90553d3
Fix reseeding core
dhardy Jan 28, 2026
905885e
Move ReseedingRng
dhardy Jan 28, 2026
f918341
Fix reseeding threshold
dhardy Jan 28, 2026
e042afe
Remove ReseedingRng
dhardy Jan 28, 2026
d2117c5
CHANGELOG
dhardy Jan 28, 2026
76b5b90
Remove benchmark reseeding_bytes
dhardy Jan 28, 2026
bfa14ab
Remove ReseedingRng (#1722)
dhardy Feb 2, 2026
7057d35
Update chacha20 and use chacha20::ChaChaCore
dhardy Feb 2, 2026
37e58a0
Update chacha20 and use chacha20::ChaChaCore (#1727)
dhardy Feb 2, 2026
9c98f59
Move log macros into a separate module (#1728)
newpavlov Feb 2, 2026
843af72
Bump the all-deps group with 11 updates
dependabot[bot] Feb 3, 2026
d86c27f
Bump the all-deps group in /benches with 19 updates
dependabot[bot] Feb 3, 2026
fd39d2c
Bump the all-deps group with 11 updates (#1730)
dhardy Feb 4, 2026
40fe1e9
Bump the all-deps group in /benches with 19 updates (#1731)
dhardy Feb 4, 2026
642ea54
Remove "nightly" feature
dhardy Feb 4, 2026
042052c
Remove old deprecations
dhardy Feb 4, 2026
ea71ad8
Bump "since" version for remaining deprecation notices
dhardy Feb 4, 2026
74fa1b4
Removed feature small_rng
dhardy Feb 4, 2026
2e6a552
Remove features "nightly", "small_rng"; remove old deprecated code (#…
dhardy Feb 4, 2026
f643430
Remove obsolete comment
dhardy Feb 4, 2026
27d70b4
Use core::error::Error without feature std
dhardy Feb 4, 2026
7379734
README updates: reprod
dhardy Feb 4, 2026
7a8dc3b
Bump versions to 0.10.0-rc.9
dhardy Feb 4, 2026
2f54a9e
rand_pcg CHANGELOG
dhardy Feb 3, 2026
d5f6525
release.yml: also publish rand_pcg
dhardy Feb 3, 2026
72afe1e
Minor tweaks; prepare v0.10.0-rc.9 (#1736)
dhardy Feb 4, 2026
213bb3b
Bump chacha20 to 0.10.0-rc.11
dhardy Feb 5, 2026
fda8f74
Remove bytes_until_reseed field
dhardy Jan 28, 2026
b14483e
Apply inline attr to fn generate
dhardy Feb 2, 2026
03db311
Replace fn reseed_and_generate with try_to_reseed
dhardy Feb 2, 2026
28e3df8
Update chacha20: use ChaChaCore directly; remove bytes_until_reseed f…
dhardy Feb 7, 2026
8cacd6d
README tweaks (#1737)
dhardy Feb 7, 2026
146da58
CHANGELOG: add PR links (#1738)
dhardy Feb 7, 2026
95c5165
Add fn rand::make_rng (#1734)
dhardy Feb 8, 2026
acc5f24
Prepare v0.10.0 releases (#1729)
dhardy Feb 8, 2026
7e9754b
Test lockfile is up-to-date (#1739)
dhardy Feb 9, 2026
87638fb
Move `rand_pcg` to the `rust-random/rngs` repository (#1740)
newpavlov Feb 9, 2026
8a01cf1
Bump the all-deps group with 2 updates (#1741)
dependabot[bot] Feb 11, 2026
fca387e
Remove `[workspace]` section from `rand`'s Cargo.toml (#1743)
newpavlov Feb 11, 2026
4501db4
Remove benches/Cargo.lock (#1745)
dhardy Feb 14, 2026
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
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2
updates:
- package-ecosystem: cargo
directory: "/"
versioning-strategy: lockfile-only
allow:
- dependency-type: "all"
schedule:
interval: weekly
groups:
all-deps:
patterns:
- "*"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: weekly
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@v6
- 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@v6
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
- name: Test
run: RUSTFLAGS=-Dwarnings cargo test --benches
19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Publish to crates.io and create GitHub release
on:
push:
tags: ['[0-9].[0-9].*', '[0-9].[1-9][0-9].*']

jobs:
# Source: https://crates.io/docs/trusted-publishing
publish:
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v6
- uses: rust-lang/crates-io-auth-action@v1
id: auth
- run: cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
187 changes: 187 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
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/**"
schedule:
- cron: '0 0 * * SUN'

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

jobs:
lockfile:
name: Lockfile is up-to-date
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- run: cargo check --workspace --locked

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.93
components: clippy
- run: cargo clippy --workspace --lib --bins --tests -- -D warnings

fmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
components: 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@v6
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
- name: rand
run: cargo doc --all-features --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.85.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@v6
- 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 }}
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,sys_rng,unbiased
cargo test --target ${{ matrix.target }} --lib --tests --no-default-features --features=alloc,sys_rng
cargo test --target ${{ matrix.target }} --examples
- name: Test rand (all stable features)
run: |
cargo test --target ${{ matrix.target }} --features=serde,log

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@v6
- name: Install toolchain
uses: dtolnay/rust-toolchain@master
with:
target: ${{ matrix.target }}
toolchain: ${{ matrix.toolchain }}
- name: Cache cargo plugins
uses: actions/cache@v5
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
cross test --no-fail-fast --target ${{ matrix.target }} --examples

test-miri:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- 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

test-no-std:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- 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

test-ios:
runs-on: macos-latest
steps:
- uses: actions/checkout@v6
- 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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
target
Cargo.lock
rand_wasm_bindgen_test*.[tj]s
rand_wasm_bindgen_test*.wasm
/benches/Cargo.lock
Loading