Skip to main content

vyre_runtime/pipeline_cache/
mod.rs

1//! P4.3  -  content-addressed pipeline cache.
2//!
3//! Every compiled `Program` has a stable fingerprint =
4//! `blake3(canonicalize(program).to_wire())`. The fingerprint
5//! becomes the cache key: two authors who write the same
6//! computation via different spellings share cached target binaries /
7//! native-backend artifacts, skipping recompilation.
8//!
9//! The cache is deliberately composable at this layer. Hot paths use
10//! [`InMemoryPipelineCache`], persistent process-restart reuse uses
11//! [`DiskCache`], and callers that want both compose them with
12//! [`LayeredPipelineCache`].
13
14#![allow(clippy::missing_const_for_thread_local, clippy::explicit_auto_deref)]
15
16mod disk;
17mod fingerprint;
18mod in_memory;
19mod layered;
20mod metrics;
21#[cfg(feature = "remote-cache")]
22mod remote;
23mod store;
24
25#[cfg(test)]
26pub(super) mod test_helpers;
27
28pub use disk::{
29    DiskCache, DiskCacheDurabilityReport, DiskCacheError, PersistentPipelineCacheStore,
30};
31pub use fingerprint::PipelineFingerprint;
32pub use in_memory::{InMemoryEvictionReason, InMemoryEvictionReport, InMemoryPipelineCache};
33pub use layered::{LayeredPipelineCache, LayeredPromotionReport};
34pub use metrics::{PipelineCacheMetricError, PipelineCacheMetrics};
35#[cfg(feature = "remote-cache")]
36pub use remote::RemoteCache;
37pub use store::PipelineCacheStore;