euv_core/dynamic/engine/
const.rs1pub const DEFAULT_CANDIDATE_MAILBOX_CAP: usize = 4;
3
4pub const DEFAULT_MAX_ARTIFACT_BYTES: u64 = 16 * 1024 * 1024;
6
7pub const DEFAULT_UPDATE_HTTP_TIMEOUT_MS: u64 = 5_000;
9
10pub const DEFAULT_SSE_RECONNECT_MS: u64 = 100;
12
13pub const UPDATE_WORKER_THREAD_NAME: &str = "euv-update-worker";
15
16pub const ENV_EUV_UPDATE_URL: &str = "EUV_UPDATE_URL";
18
19pub const ENV_EUV_PROXY_URL: &str = "EUV_PROXY_URL";
21
22pub const ENV_HTTPS_PROXY: &str = "HTTPS_PROXY";
24
25pub const ENV_HTTP_PROXY: &str = "HTTP_PROXY";
27
28pub const ENV_HTTPS_PROXY_LOWER: &str = "https_proxy";
30
31pub const ENV_HTTP_PROXY_LOWER: &str = "http_proxy";
33
34pub const DEFAULT_HOT_UPDATE_SERVER_URL: &str = "http://127.0.0.1:8787";
36
37pub const DEFAULT_HOT_UPDATE_CHANNEL: &str = "prod";
39
40pub const DEFAULT_POLL_FALLBACK_SECS: u64 = 30;
42
43#[cfg(not(target_arch = "wasm32"))]
45pub(crate) const HDR_PROXY_AUTHORIZATION: &str = "Proxy-Authorization";
46
47#[cfg(not(target_arch = "wasm32"))]
49pub(crate) const HDR_PROXY_CONNECTION: &str = "Proxy-Connection";
50
51pub(crate) const BASE64_STD_TABLE: &[u8; 64] =
53 b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
54
55#[cfg(not(target_arch = "wasm32"))]
57pub(crate) const UPDATE_HTTP_SCHEME: &str = "http://";
58
59#[cfg(not(target_arch = "wasm32"))]
61pub(crate) const HTTP_HEADER_END_MARKER: &[u8] = b"\r\n\r\n";
62
63#[cfg(not(target_arch = "wasm32"))]
65pub(crate) const HDR_LAST_EVENT_ID: &str = "Last-Event-ID";
66
67#[cfg(not(target_arch = "wasm32"))]
69pub(crate) const HDR_RANGE: &str = "Range";
70
71#[cfg(not(target_arch = "wasm32"))]
73pub(crate) const HDR_TRANSFER_ENCODING_CHUNKED: &str = "chunked";
74
75#[cfg(not(target_arch = "wasm32"))]
77pub(crate) const HDR_TRANSFER_ENCODING_KEY: &str = "transfer-encoding";
78
79#[cfg(not(target_arch = "wasm32"))]
81pub(crate) const HDR_CONTENT_LENGTH_KEY: &str = "content-length";
82
83#[cfg(not(target_arch = "wasm32"))]
85pub(crate) const SSE_WIRE_ID_PREFIX: &str = "id:";
86
87#[cfg(not(target_arch = "wasm32"))]
89pub(crate) const SSE_WIRE_EVENT_PREFIX: &str = "event:";
90
91#[cfg(not(target_arch = "wasm32"))]
93pub(crate) const SSE_WIRE_DATA_PREFIX: &str = "data:";
94
95#[cfg(not(target_arch = "wasm32"))]
97pub(crate) const QUERY_MODE_WASM: &str = "wasm_component";
98
99#[cfg(not(target_arch = "wasm32"))]
101pub(crate) const QUERY_MODE_DATA: &str = "declarative_data";
102
103#[cfg(not(target_arch = "wasm32"))]
105pub(crate) const ERR_INVALID_HTTP_BASE_URL: &str =
106 "update server base_url must use http://host:port";
107
108#[cfg(not(target_arch = "wasm32"))]
110pub(crate) const ERR_MALFORMED_HTTP_RESP: &str = "malformed HTTP response from update server";
111
112#[cfg(not(target_arch = "wasm32"))]
114pub(crate) const ERR_HTTP_NON_OK: &str = "unexpected HTTP status from update server";
115
116pub(crate) const ERR_WASM_ARTIFACT_ABI: &str = "wasm artifact failed host ABI export check";
118
119pub(crate) const ERR_DECLARATIVE_JSON: &str =
121 "declarative artifact payload is not a valid DynamicNodeSpec";
122
123pub(crate) const ERR_ACTION_DENIED: &str = "cross-route action is not permitted by host policy";
125
126pub(crate) const ERR_ACTION_CANCELLED: &str =
128 "cross-route action cancelled by stale generation token";
129
130pub(crate) const ERR_NO_ACTIVE_GENERATION: &str = "no active release generation installed";
132
133#[cfg(not(target_arch = "wasm32"))]
135pub(crate) const ERR_WORKER_SPAWN: &str = "failed to spawn background update worker thread";
136
137#[cfg(target_arch = "wasm32")]
139pub(crate) const ERR_WASM32_SYNC_HTTP: &str =
140 "synchronous TCP HTTP transport unavailable on wasm32";