I'm currently writing a procedural macro that looks like
It performs some computation on the files within the
../foo/bar directory, then "returns" the outcome.
It works fine, except that I would like the code that calls this macro to be recompiled if the content of
In other words, I would like an equivalent to printing
cargo:rerun-if-changed from a build script but for procedural macros.
As a tentative solution, I've tried tweaking the Rust code that the procedural macro generate calls to generate calls to
include_str!(path_file_we_depend_upon). This unfortunately doesn't work, as the compiler complains that the files I pass to
include_str! don't exist (even though the paths are correct and the files do exist) and I don't understand why.
Is there any solution to this problem at the moment?