vc-runtime 0.1.0

Runtime backend for Visual Compiler
Documentation
//! Runtime profile domain model.
//!
//! A profile selects a backend and provides runtime overrides.

use serde::{Deserialize, Serialize};
use std::path::PathBuf;

/// Typed runtime override values.
///
/// All fields are optional. When present, these values override the
/// corresponding backend configuration during runtime.
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
#[serde(default)]
pub struct RuntimeOverrides {
    pub timeout_secs: Option<u64>,
    pub poll_timeout_secs: Option<u64>,
    pub poll_interval_ms: Option<u64>,
    pub workflow_template_path: Option<PathBuf>,
}

/// A named runtime profile.
///
/// The name is external (key in `AppConfig.profiles` HashMap).
/// A profile selects a backend by name and optionally provides
/// typed overrides.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct RuntimeProfile {
    /// Name of the backend selected by this profile.
    pub backend_name: String,

    #[serde(default)]
    pub overrides: RuntimeOverrides,
}