Skip to content

no_std: refactor random primitives to use getrandom#606

Open
mparkachov wants to merge 5 commits intomattwparas:masterfrom
mparkachov:mwp-no-std-random
Open

no_std: refactor random primitives to use getrandom#606
mparkachov wants to merge 5 commits intomattwparas:masterfrom
mparkachov:mwp-no-std-random

Conversation

@mparkachov
Copy link
Copy Markdown
Contributor

Centralize randomness in steel/random without rand, keeping std/no_std behavior intact via getrandom features.

Changes:

  • Replace rand usage with getrandom::fill directly in random.rs.
  • Keep unbiased range generation with rejection sampling.
  • Remove rand dependency; wire getrandom with default-features = false and getrandom/std under the std feature.

Testing:

  • cargo test --all -> ok

@mattwparas
Copy link
Copy Markdown
Owner

whoops - there are some merge conflicts

Otherwise this LGTM

@mparkachov
Copy link
Copy Markdown
Contributor Author

Merged master to the branch, resolved conflicts and fixed formatting.

# Conflicts:
#	crates/steel-core/src/steel_vm/engine.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants