euv-core 0.53.0

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
/// Author- or framework-supplied placement hint attached to a `LayoutBoundary`.
#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub enum LayoutBoundaryHint {
    /// Let `SubtreePartitionPlanner` automatically decide CPU vs GPU lane using size and style predicates.
    #[default]
    Auto,
    /// Prefer CPU execution unless overridden by global hardware compute policy.
    PreferCpu,
    /// Prefer GPU compute layout whenever hardware is available and style predicates pass.
    PreferGpu,
    /// Pin this subtree strictly to CPU layout (for example, rich wrapping prose or IME inputs).
    ForceCpu,
}

/// Assigned execution lane for a single partitioned layout subtree.
#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub enum SubtreeLane {
    /// Subtree is solved by the CPU layout solver (serial or parallel work-stealing).
    #[default]
    CpuSubtree,
    /// Subtree is offloaded to Pass 0 GPU compute layout with zero-readback indirect draw.
    GpuSubtree,
}

/// Reason why a candidate subtree was kept on CPU instead of promoted to GPU compute layout.
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub enum GpuSubtreeRejectReason {
    /// Subtree node count is below the configured `min_gpu_nodes` break-even threshold.
    BelowNodeThreshold,
    /// Subtree contains too many wrapping text nodes (`wrapping_text_ratio > max_text_wrap_ratio`).
    TextWrapRatioExceeded,
    /// Subtree contains layout or node modes outside the GPU compute kernel contract.
    UnsupportedLayoutMode,
    /// Subtree exceeds the maximum level-synchronous GPU compute depth.
    ExceedsMaxDepth,
    /// Hardware GPU compute backend is unavailable on the current platform/device.
    HardwareUnavailable,
    /// Device is thermally throttled, requiring immediate GPU offload deferral.
    ThermalThrottled,
    /// Subtree carries an explicit `LayoutBoundaryHint::ForceCpu` or `PreferCpu` boundary.
    ExplicitCpuBoundary,
}