pub struct RustcOutputs {
pub directory: PathBuf,
pub files: Vec<PathBuf>,
pub dep_info: PathBuf,
}Expand description
The cacheable files and dependency manifest produced by a rustc invocation.
Fields§
§directory: PathBufCommon directory containing all modeled outputs.
files: Vec<PathBuf>Cacheable library, metadata, and/or linked program files.
dep_info: PathBufDep-info file used for precise input discovery.
Implementations§
Source§impl RustcOutputs
impl RustcOutputs
Sourcepub fn build_script_executable(&self, crate_name: &str) -> Option<&Path>
pub fn build_script_executable(&self, crate_name: &str) -> Option<&Path>
The linked executable Cargo will run as a build script, when this is a build-script compilation.
Cargo names a build script’s crate build_script_ plus the stem of its
source: build_script_build for build.rs, build_script_main for
build = "builder/main.rs". A [[bin]] target can take the same name,
and Cargo’s output directory does not tell them apart, so the caller
has to confirm from Cargo’s environment that this is a build script:
Cargo sets CARGO_BIN_NAME for binary targets and never for one.
Sourcepub fn is_executable(&self, path: &Path) -> bool
pub fn is_executable(&self, path: &Path) -> bool
Whether path is a linked program whose executable permission is part
of the declared output contract.
A program is whatever this invocation emitted that is not a library
artifact. Every tier the adapter admits distinguishes the two by
extension – rlib and rmeta are the compiler’s own, and a linked
program carries either the target’s (wasm) or none at all – so the
name is enough and no separate list has to be carried alongside.