[][src]Struct cargo::core::compiler::BuildConfig

pub struct BuildConfig {
    pub requested_target: Option<String>,
    pub jobs: u32,
    pub release: bool,
    pub mode: CompileMode,
    pub message_format: MessageFormat,
    pub force_rebuild: bool,
    pub build_plan: bool,
    pub cargo_as_rustc_wrapper: bool,
    pub extra_rustc_env: Vec<(String, String)>,
    pub extra_rustc_args: Vec<String>,
    pub rustfix_diagnostic_server: RefCell<Option<RustfixDiagnosticServer>>,
}

Configuration information for a rustc build.

Fields

requested_target: Option<String>

The target arch triple, defaults to host arch

jobs: u32

How many rustc jobs to run in parallel

release: bool

Whether we are building for release

mode: CompileMode

In what mode we are compiling

message_format: MessageFormat

Whether to print std output in json format (for machine reading)

force_rebuild: bool

Force cargo to do a full rebuild and treat each target as changed.

build_plan: bool

Output a build plan to stdout instead of actually compiling.

cargo_as_rustc_wrapper: bool

Use Cargo itself as the wrapper around rustc, only used for cargo fix

extra_rustc_env: Vec<(String, String)>

Extra env vars to inject into rustc commands

extra_rustc_args: Vec<String>

Extra args to inject into rustc commands

rustfix_diagnostic_server: RefCell<Option<RustfixDiagnosticServer>>

Methods

impl BuildConfig[src]

pub fn new(
    config: &Config,
    jobs: Option<u32>,
    requested_target: &Option<String>,
    mode: CompileMode
) -> CargoResult<BuildConfig>
[src]

Parse all config files to learn about build configuration. Currently configured options are:

  • build.jobs
  • build.target
  • target.$target.ar
  • target.$target.linker
  • target.$target.libfoo.metadata

pub fn json_messages(&self) -> bool[src]

pub fn test(&self) -> bool[src]

Trait Implementations

impl Debug for BuildConfig[src]

Auto Trait Implementations

impl Send for BuildConfig

impl !Sync for BuildConfig

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same for T

type Output = T

Should always be Self