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

pub struct BuildConfig {
    pub requested_kinds: Vec<CompileKind>,
    pub jobs: u32,
    pub requested_profile: InternedString,
    pub mode: CompileMode,
    pub message_format: MessageFormat,
    pub force_rebuild: bool,
    pub build_plan: bool,
    pub unit_graph: bool,
    pub primary_unit_rustc: Option<ProcessBuilder>,
    pub rustfix_diagnostic_server: RefCell<Option<RustfixDiagnosticServer>>,
    pub export_dir: Option<PathBuf>,
    pub future_incompat_report: bool,
}
Expand description

Configuration information for a rustc build.

Fields

requested_kinds: Vec<CompileKind>

The requested kind of compilation for this session

jobs: u32

Number of rustc jobs to run in parallel.

requested_profile: InternedString

Build profile

mode: CompileMode

The mode we are compiling in.

message_format: MessageFormat

true to print stdout 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.

unit_graph: bool

Output the unit graph to stdout instead of actually compiling.

primary_unit_rustc: Option<ProcessBuilder>

An optional override of the rustc process for primary units

rustfix_diagnostic_server: RefCell<Option<RustfixDiagnosticServer>>

A thread used by cargo fix to receive messages on a socket regarding the success/failure of applying fixes.

export_dir: Option<PathBuf>

The directory to copy final artifacts to. Note that even if out_dir is set, a copy of artifacts still could be found a target/(debug\release) as usual.

future_incompat_report: bool

true to output a future incompatibility report at the end of the build

Implementations

Parses 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

Whether or not the user wants JSON output. Whether or not rustc actually uses JSON is decided in add_error_format.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.