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

FreeBSD Manual Pages


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

       cargo-rustc - Compile a package and all of its dependencies

       cargo rustc [OPTIONS] [--] [<OPTS>...]

       The  specified  target for the current package (or package specified by
       SPEC if provided) will be compiled along	with all of its	 dependencies.
       The specified ...  will all be passed to	the final compiler invocation,
       not any of the dependencies.  Note that the compiler will still	uncon-
       ditionally  receive  arguments  such as -L, --extern, and --crate-type,
       and the specified ...  will simply be added to the compiler invocation.

       This command requires that only one target is being compiled.  If  more
       than  one  target  is  available	for the	current	package	the filters of
       --lib, --bin, etc, must be used to select which target is compiled.  To
       pass  flags  to all compiler processes spawned by Cargo,	use the	$RUST-
       FLAGS environment variable or the build.rustflags configuration option.

       -h, --help
	      Print this message.

       -p SPEC,	--package SPEC
	      The profile to compiler for.

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

       --lib  Build only this package's	library.

       --bin NAME
	      Build only the specified binary.

       --example NAME
	      Build only the specified example.

       --test NAME
	      Build only the specified test target.

       --bench NAME
	      Build only the specified benchmark target.

	      Build artifacts in release mode, with optimizations.

       --profile PROFILE
	      Profile to build the selected target for.

       --features FEATURES
	      The version to yank or un-yank.

	      Build all	available features.

	      Do not compile default features for the package.

       --target	TRIPLE
	      Target triple which compiles will	be for.

       --manifest-path PATH
	      Path to the manifest to fetch dependencies for.

       -v, --verbose
	      Use verbose output.

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

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

       cargo(1), cargo-run(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	   July	2016			CARGO-RUSTC(1)


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

home | help