Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
CARGO-INSTALL(1)		 Cargo Manual		      CARGO-INSTALL(1)

       cargo-install - Install a Rust binary

       cargo install [OPTIONS] <CRATE>

       cargo install [OPTIONS] --list

       Install a Rust binary

       This  command manages Cargo's local set of install binary crates.  Only
       packages	which have [[bin]] targets can be installed, and all  binaries
       are  installed  into the	installation root's bin	folder.	 The installa-
       tion root is determined,	in order of precedence,	by --root,  $CARGO_IN-
       STALL_ROOT,  the	 install.root  configuration key, and finally the home
       directory (which	is either $CARGO_HOME if set or	 $HOME/.cargo  by  de-

       There  are  multiple  sources from which	a crate	can be installed.  The
       default location	is but the --git and --path flags can	change
       this  source.   If  the	source contains	more than one package (such as or a git repository with multiple crates)  the	  argument  is
       required	to indicate which crate	should be installed.

       Crates  from can optionally specify the version they wish to
       install via the --vers flags, and similarly packages from git reposito-
       ries can	optionally specify the branch, tag, or revision	that should be
       installed.  If a	crate has multiple binaries, the  --bin	 argument  can
       selectively install only	one of them, and if you'd rather install exam-
       ples the	--example argument can be used as well.

       As a special convenience, omitting the <crate>  specification  entirely
       will  install  the crate	in the current directory.  That	is, install is
       equivalent to the more explicit "install	--path .".

       The --list option will list all	installed  packages  (and  their  ver-

   Query options
       --list List all installed packages (and their versions).

   Specifying what crate to install
       --vers VERS
	      Specify a	version	to install from

       --git URL
	      Git URL to install the specified crate from.

       --branch	BRANCH
	      Branch to	use when installing from git.

       --tag TAG
	      Tag to use when installing from git.

       --rev SHA
	      Specific commit to use when installing from git.

       --path PATH
	      Filesystem path to local crate to	install.

   Built and install options
       -h, --help
	      Print this message.

       -j N, --jobs N
	      Number of	parallel jobs, defaults	to # of	CPUs.

       --features FEATURES
	      Space-separated list of features to activate.

	      Build all	available features.

       -f, --force
	      Force overwriting	existing crates	or binaries

	      Do not build the default feature.

	      Build in debug mode instead of release mode.

       --bin NAME
	      Only install the binary NAME.

       --example EXAMPLE
	      Install the example EXAMPLE instead of binaries.

       --root DIR
	      Directory	to install packages into.

       -v, --verbose
	      Use verbose output.

       -q, --quiet
	      No output	printed	to stdout.

       --color WHEN
	      Coloring:	auto, always, never.

       cargo(1), cargo-search(1), cargo-publish(1)

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

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


Want to link to this manual page? Use this URL:

home | help