Change default version of new crates created by cargo new

i like to have the "version" field of crates without a stable release set to "0.0.0", partially because that's the convention in go, but also because it allows me to choose between releasing 0.1.0 and 0.0.1, depending on how stable the project is. it also makes any possible --version flag show the actually correct version.

is there any way to change the initial version of new crates? or to edit the template used by "cargo new"?

No, there is no way to change the default version of the manifest file that cargo new creates to anything other than 0.1.0.

Nope, what cargo generates on new is pretty much hard-coded (e.g. the version is set here in code).
you would have to use alternatives, like cargo-generate, to use templates.
See also the cargo bug about templates.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.