I often enough for cooperation with other language have to generate Rust source
code with help of rust-bindgen or rust_swig.
Because of cargo
not cache include!
(or I can not find switch for this?),
it takes time to rebuild such crate even if nothing was changed.
So to not depend on something like GNU Make
, I wrote simple crate with functionality like this:
Make::new()
.add_rule(Rule{
input_file_paths: vec!["aa".into()],
output_file_paths: vec!["b".into()],
exec: Box::new(|input, output| { Ok(())})
})
.run().expect("make failed");
which run rule only if meta().modified()
hint to do so.
It is really simple, so I wonder, may be crate with such functionality already exists?