MAN page from openSUSE Leap 42 cargo-1.31.1-187.1.x86_64.rpm
CARGO\-BUILD
Section: Cargo Manual (1)
Updated: May 2016
Index NAME
cargo-build - Compile the current package
SYNOPSIS
I]cargo build] [OPTIONS]
DESCRIPTION
Compile a local package and all of its dependencies.
If the B]--package] argument is given, then I]SPEC] is apackage id specification which indicates which package should be built.If it is not given, then the current package is built.For more information on I]SPEC] and its format, see the "cargohelp pkgid" command.
Compilation can be configured via the use of profiles which areconfigured in the manifest.The default profile for this command is I]dev], but passing theB]--release] flag will use the I]release] profile instead.
OPTIONS
- -h, --help
- Print this message.
- -p I]SPEC], --package I]SPEC ...]
- Package to build.
- -j I]IN], --jobs I]IN]
- Number of parallel jobs, defaults to # of CPUs.
- --lib
- Build only this package[aq]s library.
- --bin I]NAME]
- Build only the specified binary.
- --example I]NAME]
- Build only the specified example.
- --test I]NAME]
- Build only the specified test target.
- --bench I]NAME]
- Build only the specified benchmark target.
- --release
- Build artifacts in release mode, with optimizations.
- --all-features
- Build all available features.
- --features I]FEATURES]
- Space-separated list of features to also build.
- --no-default-features
- Do not build the C]default] feature.
- --target I]TRIPLE]
- Build for the target triple.
- --manifest-path I]PATH]
- Path to the Cargo.toml to compile.
- -v, --verbose
- Use verbose output.
- -q, --quiet
- No output printed to stdout.
- --color I]WHEN]
- Coloring: auto, always, never.
EXAMPLES
Build a local package and all of its dependencies
C]$ cargo build]
Build a package with optimizations
C]$ cargo build --release]
SEE ALSO
cargo(1)
COPYRIGHT
This work is dual-licensed under Apache 2.0 and MIT terms.See I]COPYRIGHT] file in the cargo source distribution.
Index
- NAME
- SYNOPSIS
- DESCRIPTION
- OPTIONS
- EXAMPLES
- SEE ALSO
- COPYRIGHT
This document was created byman2html,using the manual pages.