pub struct CapturedRustcArtifact {Show 16 fields
pub crate_name: String,
pub crate_version: Option<String>,
pub crate_types: Vec<String>,
pub emit: Vec<String>,
pub target: Option<String>,
pub compile_key: String,
pub c_metadata: String,
pub extra_filename: String,
pub dependencies: Vec<CapturedDependencyIdentity>,
pub profile: Profile,
pub out_dir: PathBuf,
pub target_dir: PathBuf,
pub build_script_out_dir: Option<PathBuf>,
pub outputs: Vec<CapturedRustcOutput>,
pub restorable: bool,
pub compile_millis: u64,
}Expand description
One rustc invocation the capture wrapper observed, recorded as it exited.
Every cargo unit routed through the wrapper produces a record — not only
the ones whose outputs are restorable artifacts — so that a record forged
inside the sandbox collides with the genuine one the wrapper sent. An
invocation with no -C metadata is not a cargo unit (a build script or
cargo itself probing rustc); it runs unrecorded, so an empty c_metadata
arriving on the channel can only be a forgery.
Fields§
§crate_name: StringThe --crate-name rustc was invoked with.
crate_version: Option<String>The crate version this invocation actually compiled, read from the registry source path.
Recorded because a dependency graph can legitimately contain two versions of one crate (bitflags 1.3.2 alongside 2.5.0, say), and they share a library target name. Attributing captures by name alone let one version’s compiled bytes be registered under the other’s identity.
crate_types: Vec<String>The --crate-type list rustc was invoked with.
emit: Vec<String>The --emit list rustc was invoked with.
target: Option<String>The --target triple rustc was invoked with, when cargo passed one.
compile_key: StringFull compile key of this invocation: the 64-hex blake3 stable identity
for registry crates, or cargo’s ephemeral -C metadata for
non-registry roots. c_metadata is its 16-hex stable prefix.
c_metadata: StringCargo’s -C metadata for this invocation, or its stable prefix when
the invocation was rewritten under a stable identity. Never empty in a
genuine record.
extra_filename: StringCargo’s -C extra-filename for this invocation.
dependencies: Vec<CapturedDependencyIdentity>Resolved dependency identities for restorable units; always empty for observed ones (nothing downstream resolves their externs).
profile: ProfileThe effective rustc profile (opt-level, debuginfo, …) of this
invocation.
out_dir: PathBufCargo’s --out-dir for this invocation; empty when the unit took
none.
target_dir: PathBufThe CARGO_TARGET_DIR the invocation ran under. The same unit is
legitimately compiled once per cargo phase, and the phase’s target dir
is what tells those records apart.
build_script_out_dir: Option<PathBuf>Cargo’s OUT_DIR env for crates with a build script: the exact
per-invocation build dir, recorded so native-artifact capture never
has to guess which {crate}-{hash} directory belongs to this
invocation.
outputs: Vec<CapturedRustcOutput>The outputs rustc wrote, each with the digest taken as rustc exited.
restorable: booltrue when this unit’s outputs are artifacts the pipeline plans and
publishes; false for cargo units that produce nothing publishable
(build-script compiles, binaries, tests), which are recorded purely so
a forged record has something to collide with.
compile_millis: u64Wall-clock milliseconds the rustc invocation took — what a cache hit on this artifact saves a consumer. Records captured before the field existed carry no timing and count as zero.
Trait Implementations§
Source§impl Clone for CapturedRustcArtifact
impl Clone for CapturedRustcArtifact
Source§impl Debug for CapturedRustcArtifact
impl Debug for CapturedRustcArtifact
Source§impl<'de> Deserialize<'de> for CapturedRustcArtifact
impl<'de> Deserialize<'de> for CapturedRustcArtifact
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for CapturedRustcArtifact
Source§impl PartialEq for CapturedRustcArtifact
impl PartialEq for CapturedRustcArtifact
Source§impl Serialize for CapturedRustcArtifact
impl Serialize for CapturedRustcArtifact
impl StructuralPartialEq for CapturedRustcArtifact
Auto Trait Implementations§
impl Freeze for CapturedRustcArtifact
impl RefUnwindSafe for CapturedRustcArtifact
impl Send for CapturedRustcArtifact
impl Sync for CapturedRustcArtifact
impl Unpin for CapturedRustcArtifact
impl UnsafeUnpin for CapturedRustcArtifact
impl UnwindSafe for CapturedRustcArtifact
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.