I'm using cbindgen through build.rs to generate a .h file for my FFI. The header file is written to the
root of the crate, or to a CARGO_TARGET_DIR (env variable), so that this can be steered by an
"outer" build system.
My problem is: whenever the header file is deleted, cargo doesn't know that the file is supposed to be
a target of the build, and if the rest of the build is up-to-date the header file will not be regenerated.
Is it possible to declare the path to the generated header file, so that the build system knows about it?
I'm thinking something along the lines of
rerun-if-changed, but meant to declare an output rather than an input file to the build system.
Thank you in advance for your help!