Expand description
Content-hashing and per-generator caching for skip-if-unchanged builds.
Constants§
- CLI_
VERSION - Version string baked into every cache entry. Bumping the WeaveFFI CLI version automatically invalidates every cache file so users never see stale generator output after an upgrade.
Functions§
- hash_
api - Serialize the API to canonical JSON and return its SHA-256 hex digest.
- hash_
api_ for_ generator - Return the SHA-256 hex digest of the API content keyed by
generator_name. - hash_
generator_ inputs - Return the SHA-256 hex digest of every input that affects a single
generator’s output: the canonical IR, the generator’s name, the
generator’s typed config (already serialized to canonical JSON bytes
by the caller via
crate::codegen::DynGenerator::config_hash_input), and the CLI version. - invalidate_
all - Delete every persisted cache entry under
out_dir/.weaveffi-cache/. - read_
generator_ cache - Read the persisted hash for
generator_namefromout_dir/.weaveffi-cache/. - write_
generator_ cache - Persist
hashas the cache entry forgenerator_name.