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

BLAKE3 in const environment #440

Open
nazar-pc opened this issue Jan 5, 2025 · 0 comments
Open

BLAKE3 in const environment #440

nazar-pc opened this issue Jan 5, 2025 · 0 comments

Comments

@nazar-pc
Copy link

nazar-pc commented Jan 5, 2025

I was going to use BLAKE3 in const environment, but it doesn't support such use case yet.

#439 made underlying portable implementation compatible with const, but didn't expose it publicly.

I wasn't sure what API you'd like and whether it should be feature-gated or not. Something like blake3::hash_const() or blake3::const_hash() might be reasonable, making portable module public and adding a separate blake3::portable::hash() (which would implicitly support const) there would make sense too.

The main complication is that Rust doesn't compile the library separately for const, so we can't use the generic code path that uses inline assembly and other features that const environment doesn't support yet, it has to be a separate entrypoint.

Looking for feedback and happy to open follow-up PR with the desired changes.

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

No branches or pull requests

1 participant