Skip to main content

haz_cache_key/
lib.rs

1//! Cache-key derivation from workspace state for `haz`.
2//!
3//! The seam between `haz-cache`'s pure cache-key serialisation and
4//! the workspace state a key is derived from. [`build_cache_key`]
5//! gathers a task's resolved inputs, its hard-predecessor stream
6//! hashes, and its environment from the validated workspace, and
7//! folds them into a [`haz_cache::CacheKey`]; [`resolve_input_files`]
8//! exposes just the input-resolution step for read-only consumers.
9//!
10//! The derivation is pure and synchronous (no `tokio` runtime), so
11//! both the executor (`haz-exec`) and the read-only `haz why`
12//! introspection path depend on this crate without either pulling
13//! the other in.
14//!
15//! [`pattern_walk`] is the shared path-pattern projection and
16//! recursive filesystem walker that input resolution builds on; the
17//! executor reuses the same walker for output materialisation.
18
19#![deny(missing_docs)]
20
21mod cache_key;
22pub mod pattern_walk;
23
24pub use cache_key::{
25    BuildKeyError, OwnedInputFile, PredecessorStreamHashes, build_cache_key, resolve_input_files,
26};