Commit Graph

123 Commits

Author SHA1 Message Date
John Nunley 7e60c7f688
chore: Forgot to bump the version
Signed-off-by: John Nunley <dev@notgull.net>
2024-04-27 16:08:02 -07:00
John Nunley dcdb769a75 v2.1.0
Signed-off-by: John Nunley <dev@notgull.net>
2024-04-27 16:07:15 -07:00
Gonçalo Rica Pais da Silva 351a708838 Use wyrand final v4.2 constants for gen_u64() 2024-04-27 12:19:04 -07:00
ironhaven 63175fa2e2 Remove unnecessary seed modifcation
Because the first step of wyrand is an addition with a constant, a non-zero seed is not required
2024-04-27 12:17:59 -07:00
John Nunley a8f98b445d v2.0.2
Signed-off-by: John Nunley <dev@notgull.net>
2024-03-23 20:40:34 -07:00
Felipe Manzano dda0fe824b Remove unnecesary instantiation 2024-03-12 07:49:31 -07:00
Tobias Stoeckmann 35b0ae32c8
Fix typo (#76)
Typo found with codespell.
2024-03-06 22:36:20 +09:00
Taiki Endo f577814484 Always set #![no_std] to fix redundant import warning
```
error: the item `Vec` is imported redundantly
   --> src/lib.rs:119:5
    |
119 | use alloc::vec::Vec;
    |     ^^^^^^^^^^^^^^^
   --> /rustc/5119208fd78a77547c705d1695428c88d6791263/library/std/src/prelude/mod.rs:115:13
    |
    = note: the item `Vec` is already defined here
    |
    = note: `-D unused-imports` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(unused_imports)]`
```
2024-03-03 06:44:02 -08:00
Petr Nevyhoštěný 034e6681fc
docs: Fix CI badge link in readme 2023-09-30 07:06:44 -07:00
John Nunley 387e3baead
v2.0.1
Signed-off-by: John Nunley <dev@notgull.net>
2023-09-25 10:39:01 -07:00
John Nunley a0bb5c01e6
docs: Mention fastrand-contrib in documentation
Also, port some bits over from src/lib.rs to README.md

Signed-off-by: John Nunley <dev@notgull.net>
2023-09-17 09:36:32 -07:00
Taiki Endo 4269d5dc45 Update actions/checkout action to v4 2023-09-10 18:27:13 +09:00
John Nunley d5e477558d
Add smol-rs logo (#64) 2023-07-17 14:40:55 +09:00
John Nunley 96c01d960e
Clarify documentation for fork() (#62) 2023-06-15 08:19:36 -07:00
John Nunley 6315dd1907
v2.0.0
- **Breaking:** Remove interior mutability from `Rng`. (#47)
- Add a `fork()` method. (#49)
- Add a `no_std` mode. (#50)
- Add an iterator selection function. (#51)
- Add a `choose_multiple()` function for sampling several elements from an iterator. (#55)
- Use the `getrandom` crate for seeding on WebAssembly targets if the `js` feature is enabled. (#60)
2023-06-08 18:58:39 -07:00
Taiki Endo 447ebc0089 Update permissions for security_audit 2023-06-09 00:16:23 +09:00
John Nunley eb78d89d4a
Use getrandom for seeding the RNG on WASM targets (#60) 2023-06-05 06:39:24 -07:00
John Nunley 46527e07b0
Mention no_std support in the docs (#58) 2023-04-07 12:02:02 -07:00
John Nunley 5706126c92
Add choose_multple function for choosing several values (#55) 2023-03-23 10:31:42 +01:00
John Nunley f939572a41
docs: Add indicators for methods that are std-only (#53)
* docs: Add std-only indications

* Module-level doc

* fmt
2023-03-03 18:49:04 -08:00
John Nunley c1cbe9b547
feat: Add an iterator selection function (#51)
* Add an iterator selection function

* Rebase atop master
2023-03-03 09:07:00 -08:00
Taiki Endo a636da29bb Fix no-std check
Use no-std target to ensure we don't link to std.
2023-02-19 12:11:33 +09:00
Taiki Endo fb7fe0be4c Disable dependency on instant when std feature is disabled 2023-02-19 12:11:33 +09:00
John Nunley 12e49cae87
feat: Add no_std mode (#50) 2023-02-18 16:20:36 -08:00
John Nunley 61adc59cc6
feat: Add a fork() method (#49)
* Add a fork() method

* Fix doctest
2023-02-17 15:01:38 -08:00
John Nunley 0e0209a77c
Remove interior mutability from Rng (#47) 2023-02-12 19:57:40 -08:00
John Nunley 675fa424bc
v1.9.0 (#48) 2023-02-12 18:29:45 -08:00
Gonçalo Rica Pais da Silva 08f7d3c29f
Optimise .fill() throughput (#43) 2023-02-01 10:36:41 +09:00
Taiki Endo 8e91b8da49 Add #[must_use] to Rng::with_seed 2023-02-01 10:33:56 +09:00
Taiki Endo fba449123f Minimize GITHUB_TOKEN permissions
Refs: https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token
2023-02-01 10:33:56 +09:00
Taiki Endo 6bb7a07734 Set CARGO_NET_GIT_FETCH_WITH_CLI=true in CI 2023-02-01 10:33:56 +09:00
Taiki Endo ea61e0fc6a Enable dependabot update for Rust 2022-12-28 12:28:30 +09:00
Taiki Endo 17ee336ebe Clean up CI config 2022-12-28 12:28:30 +09:00
Taiki Endo f842ba6cf1 Test WASI on CI 2022-12-03 00:15:48 +09:00
Taiki Endo 7622e382a1 Remove msrv field from .clippy.toml
Since Rust 1.64, Clippy respects `rust-version` field in Cargo.toml.
rust-lang/rust@b776fb8
2022-12-03 00:15:48 +09:00
Taiki Endo 83f08b49f5 Simplify wasm tests 2022-10-25 22:03:00 +09:00
Alexis Sellier 6fe2c33a26
Implement `Rng::fill` (#35)
Fills a byte slice with random data.

Benchmarks:
  test fill             ... bench:          29 ns/iter (+/- 5)
  test fill_naive       ... bench:         343 ns/iter (+/- 33)
2022-09-13 14:15:58 +02:00
Taiki Endo f53d813aa3 Release 1.8.0 2022-07-24 02:15:59 +09:00
Taiki Endo 567ee33634
Merge pull request #33 from aleksanderkrauze/get_seed-feature
Implement `get_seed`
2022-07-24 02:13:39 +09:00
Aleksander Krauze 005abc5903 Implement crate::get_seed
crate::get_seed calls Rng::get_seed on the thread-local RNG.
2022-07-23 18:54:52 +02:00
Aleksander Krauze 803cf086d9 Implement Rng::get_seed
This commit resolves #32.
2022-07-23 18:35:04 +02:00
Taiki Endo 5f8bdb636f Exclude benches from clippy 2022-07-17 21:49:03 +09:00
Taiki Endo 868e9c3257 Apply clippy to all targets 2022-07-17 21:21:54 +09:00
Taiki Endo a0c13f71b0 Update CI config 2022-07-08 02:37:16 +09:00
Taiki Endo bff2ddac00 Update actions/checkout action to v3 2022-05-01 14:29:58 +09:00
Taiki Endo fa1f7d0dae Release 1.7.0 2022-01-22 16:00:08 +09:00
Taiki Endo b8874eb81a Use install-action to install wasm-pack 2022-01-22 15:58:15 +09:00
Taiki Endo 20bfa8ddd1
Merge pull request #25 from BartMassey-upstream/char
added char() implementations and tests
2022-01-22 15:40:22 +09:00
Taiki Endo 18312568b1 Clean up CI config 2022-01-08 22:53:08 +09:00
Bart Massey 09409526f6 added forgotten tests 2022-01-08 00:33:47 -08:00