use std::path::PathBuf;
use crate::platform::Profile;
#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub struct CapturedRustcArtifact {
pub crate_name: String,
#[serde(default)]
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,
#[serde(default)]
pub target_dir: PathBuf,
#[serde(default)]
pub build_script_out_dir: Option<PathBuf>,
pub outputs: Vec<CapturedRustcOutput>,
#[serde(default)]
pub restorable: bool,
#[serde(default)]
pub consumed: bool,
#[serde(default)]
pub compile_millis: u64,
}
#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub struct CapturedDependencyIdentity {
pub crate_name: String,
pub path: PathBuf,
pub compile_key: String,
pub stable_c_metadata: String,
}
#[derive(
Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, serde::Serialize, serde::Deserialize,
)]
pub enum CapturedRustcOutputKind {
Rlib,
Rmeta,
DynamicLibrary,
}
#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub struct CapturedRustcOutput {
pub kind: CapturedRustcOutputKind,
pub path: PathBuf,
#[serde(default)]
pub snapshot_path: Option<PathBuf>,
pub sha256: String,
}