rand/Cargo.toml
Mark Wainwright 1e96eb4593
Added new versions of choose and choose_stable (#1268)
* Added new versions of choose and choose_stable

* Removed coin_flipper tests which were unnecessary and not building on ci

* Performance optimizations in coin_flipper

* Clippy fixes and more documentation

* Added a correctness fix for coin_flipper

* Update benches/seq.rs

Co-authored-by: Vinzent Steinberg <Vinzent.Steinberg@gmail.com>

* Update benches/seq.rs

Co-authored-by: Vinzent Steinberg <Vinzent.Steinberg@gmail.com>

* Removed old version of choose and choose stable and updated value stability tests

* Moved sequence choose benchmarks to their own file

* Reworked coin_flipper

* Use criterion for seq_choose benches

* Removed an old comment

* Change how c is estimated in coin_flipper

* Revert "Use criterion for seq_choose benches"

This reverts commit 23395391370ab95694558be90686eb16494e590a.

* Added seq_choose benches for smaller numbers

* Removed some unneeded lines from seq_choose

* Improvements in coin_flipper.rs

* Small refactor of coin_flipper

* Tidied comments in coin_flipper

* Use criterion for seq_choose benchmarks

* Made choose not generate a random number if len=1

* small change to IteratorRandom::choose

* Made it easier to change seq_choose benchmarks RNG

* Added Pcg64 benchmarks for seq_choose

* Added TODO to coin_flipper

* Changed criterion settings in seq_choose

Co-authored-by: Vinzent Steinberg <Vinzent.Steinberg@gmail.com>
2023-01-05 10:49:33 +00:00

82 lines
2.3 KiB
TOML

[package]
name = "rand"
version = "0.9.0"
authors = ["The Rand Project Developers", "The Rust Project Developers"]
license = "MIT OR Apache-2.0"
readme = "README.md"
repository = "https://github.com/rust-random/rand"
documentation = "https://docs.rs/rand"
homepage = "https://rust-random.github.io/book"
description = """
Random number generators and other randomness functionality.
"""
keywords = ["random", "rng"]
categories = ["algorithms", "no-std"]
autobenches = true
edition = "2021"
rust-version = "1.56"
include = ["src/", "LICENSE-*", "README.md", "CHANGELOG.md", "COPYRIGHT"]
[package.metadata.docs.rs]
# To build locally:
# RUSTDOCFLAGS="--cfg doc_cfg" cargo +nightly doc --all-features --no-deps --open
all-features = true
rustdoc-args = ["--cfg", "doc_cfg"]
[package.metadata.playground]
features = ["small_rng", "serde1"]
[features]
# Meta-features:
default = ["std", "std_rng"]
nightly = [] # some additions requiring nightly Rust
serde1 = ["serde", "rand_core/serde1"]
# Option (enabled by default): without "std" rand uses libcore; this option
# enables functionality expected to be available on a standard platform.
std = ["rand_core/std", "rand_chacha/std", "alloc", "getrandom", "libc"]
# Option: "alloc" enables support for Vec and Box when not using "std"
alloc = ["rand_core/alloc"]
# Option: use getrandom package for seeding
getrandom = ["rand_core/getrandom"]
# Option (requires nightly Rust): experimental SIMD support
simd_support = []
# Option (enabled by default): enable StdRng
std_rng = ["rand_chacha"]
# Option: enable SmallRng
small_rng = []
[workspace]
members = [
"rand_core",
"rand_distr",
"rand_chacha",
"rand_pcg",
]
[dependencies]
rand_core = { path = "rand_core", version = "0.7.0" }
log = { version = "0.4.4", optional = true }
serde = { version = "1.0.103", features = ["derive"], optional = true }
rand_chacha = { path = "rand_chacha", version = "0.4.0", default-features = false, optional = true }
[target.'cfg(unix)'.dependencies]
# Used for fork protection (reseeding.rs)
libc = { version = "0.2.22", optional = true, default-features = false }
[dev-dependencies]
rand_pcg = { path = "rand_pcg", version = "0.4.0" }
# Only to test serde1
bincode = "1.2.1"
rayon = "1.5.3"
criterion = { version = "0.4" }
[[bench]]
name = "seq_choose"
path = "benches/seq_choose.rs"
harness = false