Skip to content

Seperate template from binary #167

Open
@MabezDev

Description

@MabezDev

We've discussed this a few times, but I think we need to find a consensus as we'll keep discussing it over and over.

History

cargo-generate uses a separated template system, where the templates are independent from the binary.

The status quo

In esp-generate, we are bundling the template with the binary. This has some benefits, and some downsides which we'll need to weigh up here.


Bundled

Advantages

  • esp-generate, will always valid project as the template is a snapshot of the ecosystem at a given time
  • Template issues are typically easier to debug, just install the users version of esp-generate and input their config
  • Project generation works offline

Disadvantages

  • Requires updating esp-generate often
  • If a user doesn't update (or misses the fact they have to), they don't get the latest template

Separated

Advantages

  • One time install (sort of, there can/will be bugs)
  • Might allow for custom templates (think 3rd party templates from ecosystem)

Disadvantages

  • With cargo-generate, we struggled to easily repro generation issues
    • This is probably solvable by embedding the git hash of the template in the generated project, and having the option to generate from a git hash
  • Requires the internet to generate projects

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFCRequest for comment

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions