Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for building with pre-seeded rngs #1

Merged
merged 1 commit into from
Sep 3, 2020

Conversation

alec-deason
Copy link
Contributor

I'd love to be able to build an instance of BlueNoise using a presseded rng. I specifically want to avoid invoking get_entropy because that requires me to do more work in a minimalist WASM project I'm working on in order for getrandom to function.

This changeset is the least invasive way I could think to expose the functionality I want.

A more invasive but possibly cleaner solution, which I'm happy to write up if you prefer it, would be to create a true builder for BlueNoise which would allow for setting the rng before it needs to be initialized.

@arlyon
Copy link
Owner

arlyon commented Sep 3, 2020

A first draft of this was using a builder I'd say we're still right on the edge before it would be worth it. The changes seem reasonable :) I'll merge and release, I need to update the readme on crates.io anyways.

Thanks!

@arlyon arlyon merged commit d4786c4 into arlyon:master Sep 3, 2020
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