Skip to main content

current_binary_identity

Function current_binary_identity 

Source
pub fn current_binary_identity() -> Option<(i64, i64, u64)>
Expand description

(mtime_secs, mtime_nsecs, len) of the running zshrs binary, in the exact form stamped into a built cache.

All three terms are load-bearing. mtime alone is whole seconds in the form most stat wrappers report, so a rebuild landing in the same second as the stamp compares equal; the nanoseconds field separates them. Length alone does not identify a build either — two debug binaries here measured byte-identical in size. And the comparison is EQUALITY, never </>=: a binary whose mtime moves backwards (an older build restored over a newer one, a cp -p, a checkout of a previously built target/) passes any “not older than” test while being a different build, which is the same bug script_cache and plugin_cache carried until autoload_cache’s exact-equality shape was brought to them.