euv-core 0.47.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
/// Default capacity of the bounded non-blocking `CandidateMailbox`.
pub const DEFAULT_CANDIDATE_MAILBOX_CAP: usize = 4;

/// Default maximum size in bytes allowed for a single downloaded artifact (`16 MiB`).
pub const DEFAULT_MAX_ARTIFACT_BYTES: u64 = 16 * 1024 * 1024;

/// Default HTTP connect and read timeout in milliseconds for update requests.
pub const DEFAULT_UPDATE_HTTP_TIMEOUT_MS: u64 = 5_000;

/// Default SSE reconnect backoff interval in milliseconds.
pub const DEFAULT_SSE_RECONNECT_MS: u64 = 100;

/// Dedicated OS thread name assigned to the background `UpdateWorker`.
pub const UPDATE_WORKER_THREAD_NAME: &str = "euv-update-worker";

/// HTTP scheme prefix accepted by `HttpReleaseTransport`.
#[cfg(not(target_arch = "wasm32"))]
pub(crate) const UPDATE_HTTP_SCHEME: &str = "http://";

/// HTTP header separator marking the end of response headers.
#[cfg(not(target_arch = "wasm32"))]
pub(crate) const HTTP_HEADER_END_MARKER: &[u8] = b"\r\n\r\n";

/// HTTP header name for SSE stream resume cursor.
#[cfg(not(target_arch = "wasm32"))]
pub(crate) const HDR_LAST_EVENT_ID: &str = "Last-Event-ID";

/// HTTP header name for byte-range resume requests.
#[cfg(not(target_arch = "wasm32"))]
pub(crate) const HDR_RANGE: &str = "Range";

/// HTTP transfer-encoding chunked token.
#[cfg(not(target_arch = "wasm32"))]
pub(crate) const HDR_TRANSFER_ENCODING_CHUNKED: &str = "chunked";

/// HTTP header key prefix for transfer encoding.
#[cfg(not(target_arch = "wasm32"))]
pub(crate) const HDR_TRANSFER_ENCODING_KEY: &str = "transfer-encoding";

/// HTTP header key prefix for content length.
#[cfg(not(target_arch = "wasm32"))]
pub(crate) const HDR_CONTENT_LENGTH_KEY: &str = "content-length";

/// SSE wire prefix for event identifier lines.
#[cfg(not(target_arch = "wasm32"))]
pub(crate) const SSE_WIRE_ID_PREFIX: &str = "id:";

/// SSE wire prefix for event type lines.
#[cfg(not(target_arch = "wasm32"))]
pub(crate) const SSE_WIRE_EVENT_PREFIX: &str = "event:";

/// SSE wire prefix for data payload lines.
#[cfg(not(target_arch = "wasm32"))]
pub(crate) const SSE_WIRE_DATA_PREFIX: &str = "data:";

/// Delivery mode query token for Wasm Component channel.
#[cfg(not(target_arch = "wasm32"))]
pub(crate) const QUERY_MODE_WASM: &str = "wasm_component";

/// Delivery mode query token for Declarative Data channel.
#[cfg(not(target_arch = "wasm32"))]
pub(crate) const QUERY_MODE_DATA: &str = "declarative_data";

/// Error message when a worker URL does not start with `http://`.
#[cfg(not(target_arch = "wasm32"))]
pub(crate) const ERR_INVALID_HTTP_BASE_URL: &str =
    "update server base_url must use http://host:port";

/// Error message when a server returns a malformed HTTP response head.
#[cfg(not(target_arch = "wasm32"))]
pub(crate) const ERR_MALFORMED_HTTP_RESP: &str = "malformed HTTP response from update server";

/// Error message when an HTTP status code is not 200 or 206.
#[cfg(not(target_arch = "wasm32"))]
pub(crate) const ERR_HTTP_NON_OK: &str = "unexpected HTTP status from update server";

/// Error message when an artifact WASM binary fails ABI or export validation.
pub(crate) const ERR_WASM_ARTIFACT_ABI: &str = "wasm artifact failed host ABI export check";

/// Error message when a declarative artifact is not valid JSON `DynamicNodeSpec`.
pub(crate) const ERR_DECLARATIVE_JSON: &str =
    "declarative artifact payload is not a valid DynamicNodeSpec";

/// Error message when a cross-route action is denied by host permissions.
pub(crate) const ERR_ACTION_DENIED: &str = "cross-route action is not permitted by host policy";

/// Error message when a cross-route action was cancelled before dispatch.
pub(crate) const ERR_ACTION_CANCELLED: &str =
    "cross-route action cancelled by stale generation token";

/// Error message when no active release generation is installed on the runtime.
pub(crate) const ERR_NO_ACTIVE_GENERATION: &str = "no active release generation installed";

/// Error message when the background update worker thread cannot be spawned.
#[cfg(not(target_arch = "wasm32"))]
pub(crate) const ERR_WORKER_SPAWN: &str = "failed to spawn background update worker thread";

/// Error message when a network transport is unavailable on `wasm32` in synchronous mode.
#[cfg(target_arch = "wasm32")]
pub(crate) const ERR_WASM32_SYNC_HTTP: &str =
    "synchronous TCP HTTP transport unavailable on wasm32";