Brendonovich / swift-rs

Call Swift functions from Rust with ease!
Apache License 2.0
246 stars 28 forks source link

Retrigger build script when swift files modified #28

Closed Brendonovich closed 1 year ago

caoimhebyrne commented 1 year ago

We can probably use cargo:rerun-if-changed.

Unfortunately, you can't pass a directory:

If the path points to a directory, it will scan the entire directory for any modifications.

But iterating over all of the files in the path provided when with_package is called, and printing the following for each one could suffice:

println!("cargo:rerun-if-changed={}", path);