Expand description
Compilation and verification cache for Trident.
Caches are keyed by content hashes from hash.rs:
- Compilation cache: (source hash, target) → compiled TASM + cost info
- Verification cache: source hash → verification report
Cache location: ~/.trident/cache/ (or $TRIDENT_CACHE_DIR)
Layout:
~/.trident/cache/
├── compile/
│ └── <source_hash_hex>.<target>.tasm
└── verify/
└── <source_hash_hex>.jsonCache entries are append-only: once written, never modified. A hash uniquely identifies content, so the same hash always maps to the same result.
Structs§
- Cache
Stats - Statistics about the cache.
- Cached
Compilation - A cached compilation result.
- Cached
Verification - A cached verification result.
Functions§
- cache_
dir - Resolve the cache directory.
- clear
- Clear the entire cache.
- lookup_
compilation - Look up a cached compilation result.
- lookup_
verification - Look up a cached verification result.
- stats
- Get cache statistics.
- store_
compilation - Store a compilation result in the cache.
- store_
verification - Store a verification result in the cache.
- timestamp
- Get the current timestamp as a string.