euv-core 0.48.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
/// Active browser rendering context acquired for an `HTMLCanvasElement`.
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub enum WebCanvasContextKind {
    /// Hardware WebGPU `GPUCanvasContext` (`navigator.gpu` + `getContext("webgpu")`).
    WebGpu,
    /// Hardware-composited WebGL2 `WebGL2RenderingContext` (`getContext("webgl2", ...)`).
    WebGl2,
    /// Last-resort software `CanvasRenderingContext2d` (`getContext("2d")`) when GPU contexts fail.
    #[default]
    Canvas2d,
}

/// Strict Web presentation mode distinguishing true GPU direct draw, WebGL2 CPU dirty-rect upload, and Canvas 2D software fallback.
#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub enum WebPresentationMode {
    /// True WebGL2/WebGPU direct GPU primitive/uber-shader rendering (`cpu_mirror_active = false`, zero framebuffer pixel upload).
    GpuDirect,
    /// WebGL2 uploading CPU-rasterized dirty rects (`precision highp float` + `texelFetch`, `cpu_mirror_active = true`).
    GpuUpload,
    /// Canvas 2D `putImageData` software fallback (`cpu_mirror_active = true`).
    #[default]
    Software,
}

/// Truthful browser presentation timing source (rAF callbacks without compositor proof are always `SubmissionProxy`).
#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub enum WebPresentTimingSource {
    /// Browser `requestAnimationFrame` callback timestamp used strictly as a submission proxy (NOT compositor scanout proof).
    #[default]
    SubmissionProxy,
    /// Presentation timing could not be observed.
    Unobservable,
}