Struct cargo_options::Build
source · pub struct Build {Show 22 fields
pub common: CommonOptions,
pub manifest_path: Option<PathBuf>,
pub release: bool,
pub ignore_rust_version: bool,
pub unit_graph: bool,
pub packages: Vec<String>,
pub workspace: bool,
pub exclude: Vec<String>,
pub all: bool,
pub lib: bool,
pub bin: Vec<String>,
pub bins: bool,
pub example: Vec<String>,
pub examples: bool,
pub test: Vec<String>,
pub tests: bool,
pub bench: Vec<String>,
pub benches: bool,
pub all_targets: bool,
pub out_dir: Option<PathBuf>,
pub build_plan: bool,
pub future_incompat_report: bool,
}
Expand description
Compile a local package and all of its dependencies
Fields§
§common: CommonOptions
§manifest_path: Option<PathBuf>
Path to Cargo.toml
release: bool
Build artifacts in release mode, with optimizations
ignore_rust_version: bool
Ignore rust-version
specification in packages
unit_graph: bool
Output build graph in JSON (unstable)
packages: Vec<String>
Package to build (see cargo help pkgid
)
workspace: bool
Build all packages in the workspace
exclude: Vec<String>
Exclude packages from the build
all: bool
Alias for workspace (deprecated)
lib: bool
Build only this package’s library
bin: Vec<String>
Build only the specified binary
bins: bool
Build all binaries
example: Vec<String>
Build only the specified example
examples: bool
Build all examples
test: Vec<String>
Build only the specified test target
tests: bool
Build all tests
bench: Vec<String>
Build only the specified bench target
benches: bool
Build all benches
all_targets: bool
Build all targets
out_dir: Option<PathBuf>
Copy final artifacts to this directory (unstable)
build_plan: bool
Output the build plan in JSON (unstable)
future_incompat_report: bool
Outputs a future incompatibility report at the end of the build (unstable)
Implementations§
Methods from Deref<Target = CommonOptions>§
Trait Implementations§
source§impl CommandFactory for Build
impl CommandFactory for Build
source§impl FromArgMatches for Build
impl FromArgMatches for Build
source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches
) -> Result<Self, Error>
fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches
) -> Result<Self, Error>
source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
ArgMatches
to self
.source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches
) -> Result<(), Error>
ArgMatches
to self
.source§impl Parser for Build
impl Parser for Build
source§fn try_parse() -> Result<Self, Error<RichFormatter>>
fn try_parse() -> Result<Self, Error<RichFormatter>>
std::env::args_os()
, return Err on error.