euv-cli 0.50.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::*;

/// Configuration for building, verifying, staging, and archiving a desktop or terminal client.
#[derive(Clone, Data, Debug, Deserialize, Eq, PartialEq, Serialize)]
pub struct DesktopBuildConfig {
    /// Workspace or project root directory.
    pub(crate) repo_root: PathBuf,
    /// Target desktop or terminal platform kind.
    #[get(type(copy))]
    pub(crate) target: DesktopTargetKind,
    /// Optional explicit Cargo package name (defaults to `euv-example` or `euv-cli`).
    pub(crate) package: Option<String>,
    /// Optional explicit Rust target triple passed via `--target`.
    pub(crate) target_triple: Option<String>,
    /// Output staging directory (default `dist/client-<platform>`).
    pub(crate) out_dir: PathBuf,
    /// Optional archive destination path (`.tar.gz` or `.zip`).
    pub(crate) archive_path: Option<PathBuf>,
    /// Optional custom source PNG icon path override.
    pub(crate) icon_path: Option<PathBuf>,
    /// Optional explicit release version string override.
    pub(crate) version: Option<String>,
    /// Optional Cargo feature list passed via `--features`.
    pub(crate) features: Vec<String>,
    /// Whether to compile with `--release`.
    #[get(type(copy))]
    pub(crate) release: bool,
    /// Whether to also compile and bundle `euv-cli` (`euv[.exe]`) alongside the app binary.
    #[get(type(copy))]
    pub(crate) include_cli: bool,
    /// Whether to run post-build headless smoke verification (`--headless --software` and `euv doctor`).
    #[get(type(copy))]
    pub(crate) smoke: bool,
    /// Whether to verify zero dev-only AI schema markers in release executables.
    #[get(type(copy))]
    pub(crate) verify_ai_schema: bool,
}

/// Structured summary returned by `build_desktop_client`.
#[derive(Clone, Data, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
pub struct DesktopBuildReport {
    /// Target platform label (`macos`, `windows`, `linux`, `tui`, or `cli`).
    pub(crate) platform: String,
    /// Primary built Cargo package name.
    pub(crate) package: String,
    /// Resolved workspace semantic version.
    pub(crate) version: String,
    /// Staging directory containing binaries and native platform icon.
    pub(crate) out_dir: PathBuf,
    /// Every file staged inside `out_dir`.
    pub(crate) staged_files: Vec<PathBuf>,
    /// Path to generated platform icon (`euv.icns`, `euv.ico`, or `euv.png`), if applicable.
    pub(crate) icon_path: Option<PathBuf>,
    /// Path to written archive file, if requested.
    pub(crate) archive_path: Option<PathBuf>,
    /// Whether post-build smoke tests executed and succeeded.
    #[get(type(copy))]
    pub(crate) smoke_passed: bool,
    /// Whether release AI-schema scan verified zero dev markers.
    #[get(type(copy))]
    pub(crate) ai_schema_clean: bool,
    /// End-to-end wall-clock build and packaging duration in milliseconds.
    #[get(type(copy))]
    pub(crate) elapsed_ms: u64,
}

/// Internal package resolution metadata derived from `cargo metadata --no-deps`.
pub(crate) struct DesktopPackageMeta {
    /// Resolved primary Cargo package name.
    pub(crate) package_name: String,
    /// Resolved primary executable binary stem.
    pub(crate) bin_name: String,
    /// Resolved semantic version from `Cargo.toml`.
    pub(crate) version: String,
    /// Cargo target directory path.
    pub(crate) target_dir: PathBuf,
    /// Whether `euv-cli` exists in the workspace for `--include-cli`.
    pub(crate) has_cli_member: bool,
}