syntex icon indicating copy to clipboard operation
syntex copied to clipboard

provide cargo subcommand `cargo syntex`

Open oli-obk opened this issue 10 years ago • 4 comments

instead of relying on the user to implement a build script, now that cargo install is becoming a thing, it could be as easy as cargo install syntex, cargo syntex build

To figure out which files to use, maybe instead of main.rs.in one could use main.rs.syntex and translate all .syntex files.

oli-obk avatar Nov 10 '15 08:11 oli-obk

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?

erickt avatar Feb 12 '16 17:02 erickt

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.

dtolnay avatar Jun 12 '16 23:06 dtolnay

Maybe name all syntex plugins syntex-*. cargo syntex could then simply look for dependencies named syntex-*.

bjorn3 avatar Jun 13 '16 06:06 bjorn3

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

oli-obk avatar Jun 13 '16 08:06 oli-obk