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

Implement BufOutputReader; add rand_core impls for BufOutputReader #362

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Taywee
Copy link

@Taywee Taywee commented Nov 14, 2023

I initially started writing a separate crate for this, but the implementation is so minimal, I think it makes sense to roll it into the core library here.

src/lib.rs Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
@Taywee Taywee changed the title Add rand_core impls for OutputReader Implement BufOutputReader; add rand_core impls for OutputReader Nov 14, 2023
@Taywee
Copy link
Author

Taywee commented Nov 14, 2023

This has been largely rewritten. When adding buffering, I realized that it made no sense to have the buffering logic in the Rng-specific type. I've written a BufOutputReader type that handles the buffering and implemented the Rng traits for that.

@Taywee Taywee changed the title Implement BufOutputReader; add rand_core impls for OutputReader Implement BufOutputReader; add rand_core impls for BufOutputReader Nov 14, 2023
@Taywee
Copy link
Author

Taywee commented Nov 17, 2023

I'll also note that I have pushed this functionality as the external rand_blake3 crate, with the buffering extracted into the load-buffer crate. If you think this is too much feature creep for the blake3 crate itself, it won't hurt my feelings to just keep that functionality in those separate crates.

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