kilork.github.io

change-detection

Build-script change detection without the boilerplate.

A build script that generates code from static inputs has one job: tell Cargo when to run it again. Get it wrong in one direction and builds are stale; get it wrong in the other and every build redoes the work.

What changes for you

Getting it

cargo add --build change-detection
use change_detection::ChangeDetection;

fn main() {
    ChangeDetection::path("templates").generate();
}

Where to look

source · crate