laburnum 1.17.3

An LSP framework for building language servers and compilers, powered by an incremental query tree with content-addressed storage, task-based dataflow, and parallel queries.
// Copyright Two Neutron Stars Incorporated and contributors
// SPDX-License-Identifier: BlueOak-1.0.0

//! Hashing utilities for Laburnum.
//!
//! This module provides two distinct hashing mechanisms with different
//! guarantees:
//!
//! ## Ident Identities ([`ident`])
//!
//! - **Encoding**: 128-bit tagged value — identifiers ≤ 15 bytes inline
//!   verbatim (exact), longer ones BLAKE3 truncated to 127 bits (see ADR0012)
//! - **Portability**: compared over the canonical 16 bytes, stable across
//!   architectures
//! - **Const Support**: short idents (`new_const`) are compile-time; the BLAKE3
//!   path is runtime-only
//! - **Use Cases**: identifiers, partition keys, HashMap/HashSet keys, symbols
//!
//! ## Content Hashes ([`content`])
//!
//! - **Algorithm**: BLAKE3 (truncated to 128-bit)
//! - **Portability**: Runtime-only, no cross-build guarantees
//! - **Use Cases**: Content-addressed storage, chunk IDs, cache keys

pub mod content;
pub mod ident;

pub use {
  content::{
    ContentHash,
    ContentHashMap,
    ContentHashMapExt,
    ContentHashSet,
    ContentHashSetExt,
    ContentHashState,
    ContentHashedStore,
    ContentHashedWriter,
    ContentHasher,
  },
  ident::{
    HashMapExt,
    HashSetExt,
    Ident,
    IdentHashMap,
    IdentHashSet,
    IdentHashState,
  },
};