This should be in your build.rs by default (unless you need something else, depend on other files).
See docs, which talks about the behaviour if you don’t use this:
Normally build scripts are re-run if any file inside the crate root changes.
My emphasis. Without it you get more nonsensical rebuilds of the whole project.