pub struct Compilation<'cfg> {Show 14 fields
pub tests: Vec<(Package, Target, 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: PathBuf,
pub target_dylib_path: 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§
§tests: Vec<(Package, Target, PathBuf)>An array of all tests created during this compilation.
(package, target, path_to_test_exe)
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: PathBufThe path to rustc’s own libstd
target_dylib_path: PathBufThe 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>, default_kind: CompileKind, ) -> CargoResult<Compilation<'cfg>>
Sourcepub fn rustc_process(
&self,
pkg: &Package,
is_primary: bool,
is_workspace: bool,
) -> CargoResult<ProcessBuilder>
pub fn rustc_process( &self, pkg: &Package, is_primary: bool, is_workspace: bool, ) -> 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.
pub fn target_runner(&self) -> &Option<(PathBuf, Vec<String>)>
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.