cargo-new man page

cargo-new — Create a new cargo package


cargo new [Options] <PATH>


Create a new cargo package at <PATH>.

Use the --vcs option to control the version control system to use.


-h, --help
Print this message.
--vcs VCS
Initialize a new repository for the given version control system (git or hg) or do not initialize any version control at all (none) overriding a global configuration.
Use a binary instead of a library template.
--name NAME
Set the resulting package name.
-v, --verbose
Use verbose output.
-q, --quiet
No output printed to stdout.
--color WHEN
Coloring: auto, always, never.


Create a binary cargo package in the current directory

$ cargo new --bin ./

See Also

cargo(1), cargo-init(1)

Referenced By

cargo(1), cargo-init(1), cargo-run(1).

Explore man page connections for cargo-new(1).

The Rust package manager Cargo Manual May 2016