Struct cargo::ops::Compilation [] [src]

pub struct Compilation<'cfg> {
    pub libraries: HashMap<PackageId, Vec<(Target, PathBuf)>>,
    pub tests: Vec<(Package, String, PathBuf)>,
    pub binaries: Vec<PathBuf>,
    pub native_dirs: HashMap<PackageId, PathBuf>,
    pub root_output: PathBuf,
    pub deps_output: PathBuf,
    pub extra_env: HashMap<PackageId, Vec<(String, String)>>,
    pub to_doc_test: Vec<Package>,
    pub cfgs: HashSet<String>,
    // some fields omitted
}

A structure returning the result of a compilation.

Fields

libraries

All libraries which were built for a package.

This is currently used for passing --extern flags to rustdoc tests later on.

tests

An array of all tests created during this compilation.

binaries

An array of all binaries created.

native_dirs

All directires 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.

root_output

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

deps_output

Output directory for rust dependencies

extra_env

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

to_doc_test
cfgs

Features enabled during this compilation.

Methods

impl<'cfg> Compilation<'cfg>

fn new(config: &'cfg Config) -> Compilation<'cfg>

fn rustc_process(&self, pkg: &Package) -> CargoResult<CommandPrototype>

See process.

fn rustdoc_process(&self, pkg: &Package) -> CargoResult<CommandPrototype>

See process.

fn target_process<T: AsRef<OsStr>>(&self, cmd: T, pkg: &Package) -> CargoResult<CommandPrototype>

See process.

fn host_process<T: AsRef<OsStr>>(&self, cmd: T, pkg: &Package) -> CargoResult<CommandPrototype>

See process.

fn process(&self, cmd: CommandType, pkg: &Package) -> CargoResult<CommandPrototype>

Prepares a new process with an appropriate environment to run against the artifacts produced by the build process.

The package argument is also used to configure environment variables as well as the working directory of the child process.