emilk / eframe_template

The easy way to make a Rust app with a GUI
Apache License 2.0
786 stars 176 forks source link

Cargo Subcommand? #108

Open c-git opened 1 year ago

c-git commented 1 year ago

TLDR

Would it be desirable to have a cargo subcommand to create a new project instead of only this template?

Explanation

I'm about to start a new egui project and was about to copy the template again. Then manually make the required changes again and realized this is probably something that should get automated. I'm considering building a cargo subcommand that would:

  1. Ask the user for a project name and run cargo init to create the new project
  2. Download the files from the master branch of this template
  3. Prompt the user for answers and make the changes specified in the getting started
  4. Prompt the user if caching should be disabled
  5. Prompt if "presentation only" files should be deleted, like the readme. (Actually this is the only one I can think of right now but I'd go through the files and check)

This would provide a quick way to spin up a new project and allow users and easy way to opt out of caching at it appears some ppl would prefer not use it. It would also make it easier for ppl who are only testing and do not want caching at all like in this issue.

c-git commented 1 year ago

After further reading I'm wondering if we shouldn't default to no caching as it seems to causes issue for a lot of ppl (tbh I actually like it, but I've not deployed any of my other apps yet so I don't know how it works in production). And using the wizard from the subcommand ppl can opt in.