SkillAgentSearch skills...

Timelord

Save/restore timestamps when building Rust code in CI (to allow fresh checkouts but taking advantage of incremental builds)

Install / Use

/learn @bearcove/Timelord
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

timelord

Crates.io Documentation License: MIT OR Apache-2.0

A Rust tool to preserve file timestamps (mtime) between CI builds, even with fresh git checkouts.

Usage

Timelord preserves file timestamps between CI builds, even with fresh git checkouts. It achieves this by storing a database of file sizes and hashes, and restoring old timestamps if file contents remain unchanged.

timelord --source-dir <SOURCE_DIR> --cache-dir <CACHE_DIR>
  • <SOURCE_DIR>: Directory containing files to preserve timestamps for
  • <CACHE_DIR>: Persistent directory to store the timestamp database across CI builds

Timelord essentially implements the functionality of Cargo's unstable "checksum-freshness" feature (https://doc.rust-lang.org/cargo/reference/unstable.html#checksum-freshness), but for stable Rust.

The cache file (timelord.db) is stored in the specified cache directory and should be preserved between runs for optimal functionality.

Additional Configuration

To ensure Timelord works properly, especially in CI environments, it's important to use the -Zremap-cwd-prefix rustc flag (https://doc.rust-lang.org/beta/unstable-book/compiler-flags/remap-cwd-prefix.html). This flag helps maintain consistent paths across different build environments.

License

Licensed under either of

at your option.

View on GitHub
GitHub Stars40
CategoryDevelopment
Updated4mo ago
Forks3

Languages

Rust

Security Score

92/100

Audited on Dec 3, 2025

No findings