The blake3 host module: BLAKE3 hashing over bytes, one-shot or incremental, reaching nothing.
A digest is 32 bytes, a new Uint8Array each call. Bytes are a Uint8Array, its subclasses
included, and anything else, a proxy of one among them, is a TypeError, so nothing a caller
passes is converted or iterated. A view is read as it is when the call runs: one of a
detached buffer is a TypeError, and a fixed-length one a resize left out of its buffer's
bounds is empty. A derive-key context is a string, encoded as UTF-8 with each lone
surrogate replaced, as TextEncoder encodes it.
A hasher holds its input's state, not its input, so a stream of any length is hashed in
constant memory: update it with each chunk, and finalize for the digest of what it was
given so far, as often as needed. Its state lives as long as it can be reached, with no call
to end it, and a hasher is frozen, null-prototype, and recognized by its methods, which throw
a TypeError called on any other object.
This is the Node implementation, which runs on the Node Gro, over @fuzdev/blake3-wasm. On
fgro the module is the runtime's own, over the native blake3 crate, and grant-free, so the
project and every package may import it. Its gap against the runtime's builtin, which it
documents rather than the API weakening to match: a hasher's state is in the WASM module's
memory, released when the hasher is collected, by the package's FinalizationRegistry.