pub struct BuildConfig {
pub requested_kind: 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>>,
}Expand description
Configuration information for a rustc build.
Fields§
§requested_kind: CompileKindThe requested kind of compilation for this session
jobs: u32Number of rustc jobs to run in parallel.
requested_profile: InternedStringBuild profile
mode: CompileModeThe mode we are compiling in.
message_format: MessageFormattrue to print stdout in JSON format (for machine reading).
force_rebuild: boolForce Cargo to do a full rebuild and treat each target as changed.
build_plan: boolOutput a build plan to stdout instead of actually compiling.
unit_graph: boolOutput 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>>Implementations§
Source§impl BuildConfig
impl BuildConfig
Sourcepub fn new(
config: &Config,
jobs: Option<u32>,
requested_target: &Option<String>,
mode: CompileMode,
) -> CargoResult<BuildConfig>
pub fn new( config: &Config, jobs: Option<u32>, requested_target: &Option<String>, mode: CompileMode, ) -> CargoResult<BuildConfig>
Parses all config files to learn about build configuration. Currently configured options are:
build.jobsbuild.targettarget.$target.artarget.$target.linkertarget.$target.libfoo.metadata
Sourcepub fn emit_json(&self) -> bool
pub fn emit_json(&self) -> bool
Whether or not the user wants JSON output. Whether or not rustc
actually uses JSON is decided in add_error_format.
pub fn test(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for BuildConfig
impl !RefUnwindSafe for BuildConfig
impl Send for BuildConfig
impl !Sync for BuildConfig
impl Unpin for BuildConfig
impl UnwindSafe for BuildConfig
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
Mutably borrows from an owned value. Read more