Struct cargo::ops::CompileOptions
source · [−]pub struct CompileOptions {
pub build_config: BuildConfig,
pub cli_features: CliFeatures,
pub spec: Packages,
pub filter: CompileFilter,
pub target_rustdoc_args: Option<Vec<String>>,
pub target_rustc_args: Option<Vec<String>>,
pub target_rustc_crate_types: Option<Vec<String>>,
pub local_rustdoc_args: Option<Vec<String>>,
pub rustdoc_document_private_items: bool,
pub honor_rust_version: bool,
}Expand description
Contains information about how a package should be compiled.
Note on distinction between CompileOptions and BuildConfig:
BuildConfig contains values that need to be retained after
BuildContext is created. The other fields are no longer necessary. Think
of it as CompileOptions are high-level settings requested on the
command-line, and BuildConfig are low-level settings for actually
driving rustc.
Fields
build_config: BuildConfigConfiguration information for a rustc build
cli_features: CliFeaturesFeature flags requested by the user.
spec: PackagesA set of packages to build.
filter: CompileFilterFilter to apply to the root package to select which targets will be built.
target_rustdoc_args: Option<Vec<String>>Extra arguments to be passed to rustdoc (single target only)
target_rustc_args: Option<Vec<String>>The specified target will be compiled with all the available arguments, note that this only accounts for the final invocation of rustc
target_rustc_crate_types: Option<Vec<String>>Crate types to be passed to rustc (single target only)
local_rustdoc_args: Option<Vec<String>>Extra arguments passed to all selected targets for rustdoc.
rustdoc_document_private_items: boolWhether the --document-private-items flags was specified and should
be forwarded to rustdoc.
honor_rust_version: boolWhether the build process should check the minimum Rust version defined in the cargo metadata for a crate.
Implementations
sourceimpl CompileOptions
impl CompileOptions
pub fn new(config: &Config, mode: CompileMode) -> CargoResult<CompileOptions>
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for CompileOptions
impl !Send for CompileOptions
impl !Sync for CompileOptions
impl Unpin for CompileOptions
impl UnwindSafe for CompileOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more