Running default cargo new #802
-
Hi! I want to create a template that just adds some files to the standard |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
if you want to run Command line: cargo generate --allow-commands <template> Then you need the actual template with the files you want to add, as well as a
NOTE: if the external command ( ... if it was me, considering that |
Beta Was this translation helpful? Give feedback.
if you want to run
cargo new
as part of the template, it can be done usingRhai
as you describe, but its a bit cumbersome...Command line:
Then you need the actual template with the files you want to add, as well as a
Rhai
script that does:NOTE: if the external command (
cargo new
in this case) requires any kind of input it will fail! This is by design, and is a current known limitation.... if it was me, considering that
cargo new
doesn't give you much to start with, I wouldn't bother! Just add the few files including thecargo new
output to a small template and call it a day.…