Skip to content

BLAKE3 in const environment #440

Open
@nazar-pc

Description

@nazar-pc

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions