Struct cargo::ops::CompileOptions [] [src]

pub struct CompileOptions<'a> {
    pub config: &'a Config,
    pub jobs: Option<u32>,
    pub target: Option<&'a str>,
    pub features: &'a [String],
    pub no_default_features: bool,
    pub spec: &'a [String],
    pub filter: CompileFilter<'a>,
    pub exec_engine: Option<Arc<Box<ExecEngine>>>,
    pub release: bool,
    pub mode: CompileMode,
    pub target_rustdoc_args: Option<&'a [String]>,
    pub target_rustc_args: Option<&'a [String]>,
}

Contains information about how a package should be compiled.

Fields

config: &'a Config jobs: Option<u32>

Number of concurrent jobs to use.

target: Option<&'a str>

The target platform to compile for (example: i686-unknown-linux-gnu).

features: &'a [String]

Extra features to build for the root package

no_default_features: bool

Flag if the default feature should be built for the root package

spec: &'a [String]

Root package to build (if None it's the current one)

filter: CompileFilter<'a>

Filter to apply to the root package to select which targets will be built.

exec_engine: Option<Arc<Box<ExecEngine>>>

Engine which drives compilation

release: bool

Whether this is a release build or not

mode: CompileMode

Mode for this compile.

target_rustdoc_args: Option<&'a [String]>

Extra arguments to be passed to rustdoc (for main crate and dependencies)

target_rustc_args: Option<&'a [String]>

The specified target will be compiled with all the available arguments, note that this only accounts for the final invocation of rustc