crates/turborepo-hash/README.md
Hashing utilities for Turborepo cache keys. Uses Cap'n Proto for deterministic cross-platform serialization, then applies xxHash64 for fast hashing.
Input data (env vars, file contents, task config)
└── Cap'n Proto serialization (deterministic)
└── xxHash64
└── Cache key (hash string)
Key types:
TurboHash trait - Implemented by types that contribute to cache keysTaskHashable - Task-specific inputs for hashingGlobalHashable - Repository-wide inputsCap'n Proto ensures identical inputs produce identical hashes across platforms and Rust/Go implementations (historical). xxHash64 provides fast, high-quality hashing for the serialized data.