euv-cli 0.51.0

Cross-platform CLI tool for the euv native UI framework supporting run, build, check, fmt, doctor, new, and Hyperlane SSE dynamic updates across all supported platforms.
Documentation
use super::*;

/// Target platform metadata describing Rust triple, system APIs, and output bundle.
#[derive(Clone, Debug, Deserialize, Eq, Getter, New, PartialEq, Serialize)]
pub struct TargetSpec {
    /// Human-readable target key (`web`, `android`, `ios`, `ios-sim`, `ipad`, `ipad-sim`, `macos`, `windows`, `linux`, etc.).
    pub(crate) name: String,
    /// Rust compiler target triple.
    pub(crate) rust_triple: String,
    /// Direct OS/browser system API stack used by `euv-core`.
    pub(crate) system_api: String,
    /// Primary packaged output artifact path.
    pub(crate) artifact: String,
    /// Core `PlatformKind` discriminant.
    pub(crate) platform_kind: String,
    /// Preferred hardware GPU backend reported by `euv-core`.
    pub(crate) preferred_gpu: String,
}

/// Single executable command step inside a cross-platform `BuildPlan`.
#[derive(Clone, Debug, Deserialize, Eq, Getter, New, PartialEq, Serialize)]
pub struct BuildStep {
    /// Human-readable purpose of this step.
    pub(crate) description: String,
    /// Executable program name.
    pub(crate) program: String,
    /// Command-line arguments passed to `program`.
    pub(crate) args: Vec<String>,
}

/// Complete declarative build plan for one target platform.
#[derive(Clone, Debug, Deserialize, Eq, Getter, New, PartialEq, Serialize)]
pub struct BuildPlan {
    /// Target specification metadata.
    pub(crate) target: TargetSpec,
    /// Selected default render mode (`Auto`, `Software`, `Hardware`, `Hybrid`).
    pub(crate) render_mode: String,
    /// Whether release optimization profile is enabled.
    #[get(type(copy))]
    pub(crate) release: bool,
    /// Ordered build and packaging steps.
    pub(crate) steps: Vec<BuildStep>,
}

/// Per-target build readiness assessment on the active host machine.
#[derive(Clone, Debug, Deserialize, Eq, Getter, New, PartialEq, Serialize)]
pub struct TargetCapability {
    /// Canonical target name (e.g. `android`, `ios-sim`, `web`).
    pub(crate) target: String,
    /// Rust compiler target triple.
    pub(crate) triple: String,
    /// High-level ecosystem category label.
    pub(crate) category: String,
    /// Whether the current host OS can natively build this target.
    #[get(type(copy))]
    pub(crate) host_supported: bool,
    /// Whether all required Rust targets, SDKs, and CLI tools are present.
    #[get(type(copy))]
    pub(crate) ready: bool,
    /// Names of missing triples, tools, or SDK environment variables.
    pub(crate) missing_tools: Vec<String>,
    /// Exact commands or instructions to satisfy missing prerequisites.
    pub(crate) install_hints: Vec<String>,
}

/// Snapshot of host OS, architecture, installed Rust targets, SDK paths, and CLI build tools.
#[derive(Clone, Debug, Deserialize, Eq, Getter, New, PartialEq, Serialize)]
pub struct HostCapabilityProbe {
    /// Host operating system (`macos`, `linux`, `windows`).
    pub(crate) host_os: String,
    /// Host CPU architecture (`aarch64`, `x86_64`, etc.).
    pub(crate) host_arch: String,
    /// Rust compiler target triples reported by `rustup target list --installed`.
    pub(crate) installed_triples: Vec<String>,
    /// Detected build tool versions keyed by tool name.
    pub(crate) available_tools: BTreeMap<String, String>,
    /// Detected SDK directory paths keyed by environment variable name.
    pub(crate) env_sdks: BTreeMap<String, String>,
}