Skip to content

"cache hash" API in the std lib (or at least in src-self-hosted) #4311

@andrewrk

Description

@andrewrk

Currently, the stage1 compiler makes use of:

  • cache_hash.cpp
  • cache_hash.hpp
  • blake2b.c
  • blake2.h

As the backend for its caching. The self-hosted compiler will also need to do caching, with a similar API.

The Zig std lib has a variety of hash functions to choose from:

$ ls ../lib/std/crypto
aes.zig        blake2.zig    gimli.zig  md5.zig       sha1.zig  sha3.zig  x25519.zig
benchmark.zig  chacha20.zig  hmac.zig   poly1305.zig  sha2.zig  test.zig

Porting this API, or implementing an alternative, yet similar API, will accomplish the following:

Metadata

Metadata

Assignees

No one assigned

    Labels

    contributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.enhancementSolving this issue will likely involve adding new logic or components to the codebase.frontendTokenization, parsing, AstGen, Sema, and Liveness.stage1The process of building from source via WebAssembly and the C backend.standard libraryThis issue involves writing Zig code for the standard library.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions