pub struct Compilation<'cfg> {Show 15 fields
pub libraries: HashMap<PackageId, HashSet<(Target, PathBuf)>>,
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,
/* private fields */
}Expand description
A structure returning the result of a compilation.
Fields§
§libraries: HashMap<PackageId, HashSet<(Target, PathBuf)>>A mapping from a package to the list of libraries that need to be linked when working with that package.
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: PathBufRoot output directory (for the local package’s artifacts)
deps_output: PathBufOutput directory for rust dependencies. May be for the host or for a specific target.
host_deps_output: PathBufOutput 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: String§target: StringImplementations§
Source§impl<'cfg> Compilation<'cfg>
impl<'cfg> Compilation<'cfg>
pub fn new<'a>(bcx: &BuildContext<'a, 'cfg>) -> CargoResult<Compilation<'cfg>>
Sourcepub fn rustc_process(
&self,
pkg: &Package,
target: &Target,
) -> CargoResult<ProcessBuilder>
pub fn rustc_process( &self, pkg: &Package, target: &Target, ) -> CargoResult<ProcessBuilder>
See process.
Sourcepub fn rustdoc_process(
&self,
pkg: &Package,
target: &Target,
) -> CargoResult<ProcessBuilder>
pub fn rustdoc_process( &self, pkg: &Package, target: &Target, ) -> CargoResult<ProcessBuilder>
See process.
Sourcepub fn host_process<T: AsRef<OsStr>>(
&self,
cmd: T,
pkg: &Package,
) -> CargoResult<ProcessBuilder>
pub fn host_process<T: AsRef<OsStr>>( &self, cmd: T, pkg: &Package, ) -> CargoResult<ProcessBuilder>
See process.
Sourcepub fn target_process<T: AsRef<OsStr>>(
&self,
cmd: T,
pkg: &Package,
) -> CargoResult<ProcessBuilder>
pub fn target_process<T: AsRef<OsStr>>( &self, cmd: T, pkg: &Package, ) -> CargoResult<ProcessBuilder>
See process.