Is there a way to compile in a constant that only changes if the source or deps change? Basically a way for a binary to know what "version" it is? (does not have to be incrementing, just different if the binary has changed)
I would like to avoid timestamp because it's not constant between rebuilds. I tried hashing the sources in a build script, but the dependencies could also change. And dependencies could be path or git based, so even cargo.toml is not enough. At that point I was looking at hashing all sources, cargo.toml and cargo.lock, and I thought maybe there is an easier way to get the same end result...