If the hash is different from the last compilation, don't use the cached version. An implementation can be seen at this [link](https://neosmart.net/blog/2020/self-compiling-rust-code/).