-
Notifications
You must be signed in to change notification settings - Fork 410
Description
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.