]>
git.proxmox.com Git - rustc.git/blob - src/tools/cargo/src/bin/cargo/commands/init.rs
1 use crate::command_prelude
::*;
5 pub fn cli() -> Command
{
7 .about("Create a new cargo package in an existing directory")
11 .action(ArgAction
::Set
)
15 .arg_registry("Registry to use")
17 .after_help(color_print
::cstr
!(
18 "Run `<cyan,bold>cargo help init</>` for more detailed information.\n"
22 pub fn exec(config
: &mut Config
, args
: &ArgMatches
) -> CliResult
{
23 let opts
= args
.new_options(config
)?
;
24 let project_kind
= ops
::init(&opts
, config
)?
;
27 .status("Created", format
!("{} package", project_kind
))?
;