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

pub struct Compilation<'cfg> {
    pub tests: Vec<(Package, TargetKind, String, PathBuf)>,
    pub binaries: Vec<PathBuf>,
    pub native_dirs: BTreeSet<PathBuf>,
    pub root_output: PathBuf,
    pub deps_output: PathBuf,
    pub host_deps_output: PathBuf,
    pub host_dylib_path: Option<PathBuf>,
    pub target_dylib_path: Option<PathBuf>,
    pub extra_env: HashMap<PackageId, Vec<(String, String)>>,
    pub to_doc_test: Vec<Doctest>,
    pub cfgs: HashMap<PackageId, HashSet<String>>,
    pub rustdocflags: HashMap<PackageId, Vec<String>>,
    pub host: String,
    pub target: String,
    // some fields omitted
}

A structure returning the result of a compilation.

Fields

tests: Vec<(Package, TargetKind, String, PathBuf)>

An array of all tests created during this compilation.

binaries: Vec<PathBuf>

An array of all binaries created.

native_dirs: BTreeSet<PathBuf>

All directories for the output of native build commands.

This is currently used to drive some entries which are added to the LD_LIBRARY_PATH as appropriate.

The order should be deterministic.

root_output: PathBuf

Root output directory (for the local package's artifacts)

deps_output: PathBuf

Output directory for rust dependencies. May be for the host or for a specific target.

host_deps_output: PathBuf

Output directory for the rust host dependencies.

host_dylib_path: Option<PathBuf>

The path to rustc's own libstd

target_dylib_path: Option<PathBuf>

The path to libstd for the target

extra_env: HashMap<PackageId, Vec<(String, String)>>

Extra environment variables that were passed to compilations and should be passed to future invocations of programs.

to_doc_test: Vec<Doctest>

Libraries to test with rustdoc.

cfgs: HashMap<PackageId, HashSet<String>>

Features per package enabled during this compilation.

rustdocflags: HashMap<PackageId, Vec<String>>

Flags to pass to rustdoc when invoked from cargo test, per package.

host: Stringtarget: String

Methods

impl<'cfg> Compilation<'cfg>[src]

pub fn new<'a>(bcx: &BuildContext<'a, 'cfg>) -> CargoResult<Compilation<'cfg>>[src]

pub fn rustc_process(
    &self,
    pkg: &Package,
    target: &Target
) -> CargoResult<ProcessBuilder>
[src]

See process.

pub fn rustdoc_process(
    &self,
    pkg: &Package,
    target: &Target
) -> CargoResult<ProcessBuilder>
[src]

See process.

pub fn host_process<T: AsRef<OsStr>>(
    &self,
    cmd: T,
    pkg: &Package
) -> CargoResult<ProcessBuilder>
[src]

See process.

pub fn target_process<T: AsRef<OsStr>>(
    &self,
    cmd: T,
    pkg: &Package
) -> CargoResult<ProcessBuilder>
[src]

See process.

Auto Trait Implementations

impl<'cfg> !Send for Compilation<'cfg>

impl<'cfg> !Sync for Compilation<'cfg>

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