Skip to main content

Module entry

Module entry 

Source
Expand description

What a cache entry holds, and how it is encoded.

One entry per (file, key): everything the per-file pass produced for that file, plus the dependencies whose contents the result relied on.

§Why a hand-written encoding

The warm-run budget is milliseconds for the whole corpus, and a text format would spend most of it parsing. A binary serialization crate would do the job, but the value type here is a handful of strings, integers and one enum — small enough that the format is less code than the dependency review, and it leaves nothing to a crate’s version compatibility rules.

§Decoding is total

Every decode path returns None rather than failing or panicking. The cache is disposable: a truncated file, a torn write, a byte flipped on disk, a file written by a different build — all of them mean “recompute”, never an error the user has to act on. A cache that can break a run is worse than no cache.

Structs§

Entry
Everything one file’s pass produced.