serde-deprecated / syntex

No longer maintained
112 stars 34 forks source link

provide cargo subcommand `cargo syntex` #21

Open oli-obk opened 9 years ago

oli-obk commented 9 years ago

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.

erickt commented 8 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?

dtolnay commented 8 years ago

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.

bjorn3 commented 8 years ago

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

oli-obk commented 8 years ago

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