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

Make rand an optional dependency #42

Merged
merged 2 commits into from
Oct 19, 2023

Conversation

michalkucharczyk
Copy link

For some non-std environments we don't have access to platform randomness (provided by rand::thread_rng). In such environments the phrase or entropy may still be known, and it is be possible to instantiate Mnemonic.

This PR makes rand dependency optional (and default), and hides the Mnemonic::new function behind the rand feature, what allows to use it in environments were rand is not available.

It also introduces default-langs feature which makes inclusion of default languages easier if the crate is used with no default-features.

src/crypto.rs Outdated Show resolved Hide resolved
@maciejhirsz maciejhirsz merged commit 7076c6f into maciejhirsz:master Oct 19, 2023
1 check passed
@maciejhirsz
Copy link
Owner

Cheers!

@michalkucharczyk
Copy link
Author

That was quick :). thanks!
Would that be possible to push updated version to crates.io?

I forgot to bump version...

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