Tracking Issue for deterministic random number generation
Open
Nobody has claimed this yet.
C-tracking-issue
T-libs
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Feature gate: #![feature(deterministic_random_chacha8)]
This is a tracking issue for DeterministicRandomSource, a deterministic random number generation that will always generate the same values for a given seed.
Public API
// core::random;
pub struct DeterministicRandomSource { .. }
impl DeterministicRandomSource {
pub const fn from_seed(seed: [u8; 32]) -> DeterministicRandomSource;
pub const fn seed(&self) -> &[u8; 32];
}
impl RandomSource for DeterministicRandomSource { .. }
impl Random for DeterministicRandomSource { .. }
Steps / History
- ACP: https://github.com/rust-lang/libs-team/issues/394
- Implementation: #...
- Final comment period (FCP)^1
- Stabilization PR
Unresolved Questions
- Is ChaCha8 the right random number generator to use? Given that this RNG should not be used for cryptographic purposes, ChaCha8 might be a bit overkill.
- Does the
seedfunction make sense?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the proposed public API for DeterministicRandomSource and the linked ACP in libs-team issue #394. Review the unresolved questions about ChaCha8 and seed(), then determine how the missing implementation, final comment period, and stabilization PR would be addressed. Done means the implementation and stabilization steps are complete.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100