Go to main content

man pages section 1: User Commands

Exit Print View

Updated: Thursday, June 13, 2019
 
 

cargo-new (1)

Name

cargo-new - Create a new cargo package

Synopsis

cargo new [OPTIONS] <PATH>

Description

CARGO-NEW(1)                     Cargo Manual                     CARGO-NEW(1)



NAME
       cargo-new - Create a new cargo package

SYNOPSIS
       cargo new [OPTIONS] <PATH>

DESCRIPTION
       Create a new cargo package at <PATH>.

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

OPTIONS
       -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.

       --bin  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.

EXAMPLES
       Create a binary cargo package in the current directory

              $ cargo new --bin ./


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+----------------------+
       |ATTRIBUTE TYPE |   ATTRIBUTE VALUE    |
       +---------------+----------------------+
       |Availability   | developer/rust/cargo |
       +---------------+----------------------+
       |Stability      | Volatile             |
       +---------------+----------------------+
SEE ALSO
       cargo(1), cargo-init(1)

COPYRIGHT
       This  work  is dual-licensed under Apache 2.0 and MIT terms.  See COPY-
       RIGHT file in the cargo source distribution.



NOTES
       This software was built from source available at https://github.com/or-
       acle/solaris-userland.   The  original  community source was downloaded
       from  https://static.rust-lang.org/dist/rustc-1.28.0-src.tar.xz

       Further information about this software can be found on the open source
       community website at http://www.rust-lang.org/.



The Rust package manager           May 2016                       CARGO-NEW(1)