CARGO-NEW(1) General Commands Manual CARGO-NEW(1) (NAME) cargo-new - Cargo (SYNOPSIS) cargo new [] (DESCRIPTION) Cargo . Cargo.toml (ignore) (VCS) . VCS ( --vcs ). cargo-init(1) . (OPTIONS) new (New Options) --bin (binary target) (src/main.rs). . --lib (library target) (src/lib.rs). --edition edition (edition) Rust . 2024 . : 2015 2018 2021 2024 --name name . . --vcs vcs VCS (git hg pijul fossil) (none). git cargo-new.vcs VCS none . --registry registry publish Cargo.toml . Cargo . registry.default . --registry publish . (Display Options) -v, --verbose (verbose). << >> . term.verbose . -q, --quiet cargo . term.quiet . --color when . : o auto (): . o always: . o never: . term.color . (Common Options) +toolchain Cargo rustup cargo + (toolchain) rustup ( +stable +nightly). rustup . --config KEY=VALUE PATH Cargo . TOML KEY=VALUE . . . -C PATH . cargo (Cargo.toml) .cargo/config.toml . : cargo -C path/to/my-project build. nightly -Z unstable-options (: #10098 ). -h, --help . -Z flag ( nightly) Cargo. cargo -Z help . (ENVIRONMENT) Cargo . (EXIT STATUS) o 0: Cargo . o 101: Cargo . (EXAMPLES) 1. (binary) Cargo : cargo new foo (SEE ALSO) cargo(1), cargo-init(1) CARGO-NEW(1)