External Publication
Visit Post

Alternative to `cargo new` templates: examples as build-target templates

Rust Internals [Unofficial] March 5, 2026
Source

bushRAT:

Might be my misunderstanding, but I don't think this is a problem? Since the template wouldn't be a crate published on crates.io, the hypothetical templates section wouldn't need to link to a published crate, so there's no chicken and egg publishing issue. While a template is a crate, it would just be file(s) as far as Cargo and crates.io are concerned, entirely contained within the foo crate.

So your proposal is for there to be crates that exist but aren't part of the package or workspace that get bundled in the package? I feel like that could be confusing.

bushRAT:

cargo new already only makes sense for brand new projects, so there's no merging functionality required.

Please re-read my original post. Making cargo new additive is a major part of this idea.

Discussion in the ATmosphere

Loading comments...