cargo new <path>

Create a new cargo package at <path>

Arguments

NameDescription
pathfolders

Options

NameDescription
--registry <registry>Registry to use
--vcs <vcs>Initialize a new repository for the given version control system (git, hg, pijul, or fossil) or do not initialize any version control at all (none), overriding a global configuration
--edition <edition>Edition to set for the crate generated
--name <name>Set the resulting package name, defaults to the directory name
--color <color>Coloring: auto, always, never
--config <config>
  • Repeatable ♾
-Z <unstable-features>
  • Repeatable ♾
-q, --quietDo not print cargo log messages
--binUse a binary (application) template [default]
--libUse a library template
-h, --helpPrint help information
-v, --verbose
  • Repeatable ♾
--frozenRequire Cargo.lock and cache are up to date
--lockedRequire Cargo.lock is up to date
--offlineRun without accessing the network