euv-core 0.53.1

Core cross-platform runtime for euv featuring arena-based fine-grained reactivity, deterministic layout, flat scene graph, multi-mode rendering, and direct OS platform adapters.
Documentation
use super::*;

/// Layout solver mode encoded in the low 4 bits of `GpuLayoutNodeInput::flags_kind`.
#[derive(
    Clone, Copy, Debug, Default, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize,
)]
#[repr(u32)]
pub enum GpuLayoutMode {
    /// Fixed-column responsive grid with prefix-summed row heights.
    #[default]
    Grid = 0,
    /// Horizontal single-line flex layout with Blelloch exclusive prefix-sum and `flex_grow`.
    FlexRow = 1,
    /// Vertical single-line flex layout with Blelloch exclusive prefix-sum and `flex_grow`.
    FlexColumn = 2,
    /// Vertical stacked block container stretching children across available width.
    Block = 3,
    /// Direct coordinate placement relative to parent content bounds.
    Absolute = 4,
    /// Direct GPU scale projection for bar charts, scatter plots, and heatmaps.
    DataViz = 5,
    /// Semi-implicit Verlet spring-damper physics integration executed on GPU.
    Spring = 6,
}

/// Main-axis justification mode encoded in `GpuLayoutNodeInput::flags_kind` (`bits[4..7]`).
#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(u32)]
pub enum GpuJustifyMode {
    /// Pack items at main-axis start.
    #[default]
    Start = 0,
    /// Center items along main axis.
    Center = 1,
    /// Pack items at main-axis end.
    End = 2,
    /// Distribute remaining space evenly between items.
    SpaceBetween = 3,
}

/// Cross-axis alignment mode encoded in `GpuLayoutNodeInput::flags_kind` (`bits[7..10]`).
#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
#[repr(u32)]
pub enum GpuAlignMode {
    /// Stretch items to fill cross axis.
    #[default]
    Stretch = 0,
    /// Align items to cross-axis start.
    Start = 1,
    /// Center items along cross axis.
    Center = 2,
    /// Align items to cross-axis end.
    End = 3,
}

/// Execution backend that ran a `GpuComputeLayoutEngine` dispatch.
#[derive(
    Clone, Copy, Debug, Default, Deserialize, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize,
)]
pub enum GpuComputeBackendKind {
    /// Physical Apple Metal `MTLComputeCommandEncoder` + `drawPrimitives:indirectBuffer:`.
    MetalHardware,
    /// Bit-exact CPU reference compute parity engine for headless or non-Metal targets.
    #[default]
    CpuReferenceParity,
}