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 rustdoc_document_private_items: bool,
pub honor_rust_version: Option<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: BuildConfig
Configuration information for a rustc build
cli_features: CliFeatures
Feature flags requested by the user.
spec: Packages
A set of packages to build.
filter: CompileFilter
Filter 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)
rustdoc_document_private_items: bool
Whether the --document-private-items
flags was specified and should
be forwarded to rustdoc
.
honor_rust_version: Option<bool>
Whether the build process should check the minimum Rust version defined in the cargo metadata for a crate.
Implementations§
Source§impl CompileOptions
impl CompileOptions
pub fn new( gctx: &GlobalContext, mode: CompileMode, ) -> CargoResult<CompileOptions>
Trait Implementations§
Source§impl Clone for CompileOptions
impl Clone for CompileOptions
Source§fn clone(&self) -> CompileOptions
fn clone(&self) -> CompileOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for CompileOptions
impl !RefUnwindSafe for CompileOptions
impl !Send for CompileOptions
impl !Sync for CompileOptions
impl Unpin for CompileOptions
impl !UnwindSafe for CompileOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 504 bytes