emilk / eframe_template

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

Support cargo-generate #169

Open armandas opened 5 days ago

armandas commented 5 days ago

cargo-generate is a popular tool for generating projects from templates and significantly lowers the barrier to starting. This PR makes changes to support cargo-generate, enabling users to start a project with a single line:

cargo generate --git https://github.com/emilk/eframe_template

The core changes are:

However, the bulk of changes are in order to update the github actions. The flow is as follows:

  1. First, a project is generated using cargo-generate
  2. The generated project is uploaded as an artifact
  3. Each subsequent action downloads the generated project, instead of checking out the repository

Tangential changes to the actions:

c-git commented 2 days ago

I love the idea but wouldn't this make it incompatible with using the github template feature?

armandas commented 2 days ago

Yeah, I guess that would be the reason to keep the scripts around...

c-git commented 3 hours ago

Yeah, I guess if they use the GitHub template they can just change it manually or use the script (which will need to be updated).