Open oli-obk opened 9 years ago
Interesting! How do you think this would work when one builds a library that uses syntex? What if cargo syntex
could generate a build.rs script, and re-running it would re-generate the build.rs
?
How would a cargo subcommand know what plugins to run? Syntex by itself doesn't do anything unless you register plugins for it to apply. At that point I don't see this significantly reducing the complexity compared to build.rs.
Maybe name all syntex plugins syntex-*
. cargo syntex
could then simply look for dependencies named syntex-*
.
The idea is to not re-generate the files in every build, but generate them once and put them onto crates.io. This way crates using syntex won't even have to depend on syntex on crates.io
instead of relying on the user to implement a build script, now that
cargo install
is becoming a thing, it could be as easy ascargo install syntex
,cargo syntex build
To figure out which files to use, maybe instead of
main.rs.in
one could usemain.rs.syntex
and translate all.syntex
files.