1pub const HMR_ENDPOINT: &str = "/__euv_hmr";
3pub const OTA_MANIFEST_ENDPOINT: &str = "/__euv_ota/manifest.json";
5pub const OTA_MODULE_ENDPOINT: &str = "/__euv_ota/module.wasm";
7pub const DEV_STATUS_ENDPOINT: &str = "/__euv_status";
9pub const OTA_DEV_SIGNING_KEY: &str = "euv-dev-ota-key-2026";
11pub const OTA_SLOT_DEV: &str = "euv-dev-hot-slot";
13pub const DEFAULT_DEV_HOST: &str = "127.0.0.1";
15pub const DEFAULT_DOCS_OUT_DIR: &str = "dist/docs";
17
18pub(crate) const WATCH_IGNORED_DIRS: [&str; 12] = [
19 "target",
20 ".git",
21 "node_modules",
22 "dist",
23 "www",
24 ".cargo",
25 ".idea",
26 ".vscode",
27 ".next",
28 "pkg",
29 "out",
30 "build",
31];
32pub(crate) const WATCH_EXTS_DOCS: [&str; 8] =
33 ["md", "yaml", "yml", "png", "jpg", "jpeg", "svg", "webp"];
34pub(crate) const WATCH_EXTS_CODE: [&str; 8] =
35 ["rs", "toml", "md", "html", "css", "wgsl", "glsl", "wasm"];
36pub(crate) const MODE_LABEL_DOCS: &str = "docs";
37pub(crate) const MODE_LABEL_WEB: &str = "web";
38pub(crate) const MODE_LABEL_NATIVE: &str = "native";
39pub(crate) const MODE_LABEL_TUI: &str = "tui";
40pub(crate) const MODE_LABEL_CLI: &str = "cli";
41pub(crate) const MODE_LABEL_HARMONY: &str = "harmony";
42pub(crate) const MODE_LABEL_WEARABLE: &str = "wearable";
43pub(crate) const MODE_LABEL_MINIAPP: &str = "miniapp";
44pub(crate) const MODE_LABEL_QUICKAPP: &str = "quickapp";
45pub(crate) const HMR_EVENT_RELOAD: &str = "reload";
46pub(crate) const HMR_EVENT_OTA: &str = "ota";
47pub(crate) const HMR_EVENT_ERROR: &str = "error";
48pub(crate) const HTTP_METHOD_HEAD: &str = "HEAD";
49pub(crate) const HTTP_METHOD_OPTIONS: &str = "OPTIONS";
50pub(crate) const HTTP_200_PREFIX: &str = "HTTP/1.1 200 OK\r\nContent-Type: ";
51pub(crate) const HTTP_204_OPTIONS_RESP: &str = "HTTP/1.1 204 No Content\r\nAccess-Control-Allow-Origin: *\r\nAccess-Control-Allow-Methods: GET, HEAD, OPTIONS\r\nAccess-Control-Allow-Headers: *\r\nConnection: close\r\n\r\n";
52pub(crate) const HTTP_404_RESP: &str = "HTTP/1.1 404 Not Found\r\nContent-Type: text/plain; charset=utf-8\r\nContent-Length: 9\r\nConnection: close\r\n\r\nNot Found";
53pub(crate) const HTTP_SSE_HEADERS: &str = "HTTP/1.1 200 OK\r\nContent-Type: text/event-stream\r\nCache-Control: no-cache\r\nConnection: keep-alive\r\nAccess-Control-Allow-Origin: *\r\n\r\nretry: 1000\n\n: connected\n\n";
54pub(crate) const HTTP_CORS_HEADERS: &str =
55 "\r\nCache-Control: no-cache\r\nAccess-Control-Allow-Origin: *\r\nContent-Length: ";
56pub(crate) const HTTP_CONN_CLOSE_SEP: &str = "\r\nConnection: close\r\n\r\n";
57pub(crate) const MIME_HTML: &str = "text/html; charset=utf-8";
58pub(crate) const MIME_JSON: &str = "application/json; charset=utf-8";
59pub(crate) const MIME_XML: &str = "application/xml; charset=utf-8";
60pub(crate) const MIME_CSS: &str = "text/css; charset=utf-8";
61pub(crate) const MIME_WASM: &str = "application/wasm";
62pub(crate) const MIME_SVG: &str = "image/svg+xml";
63pub(crate) const MIME_PNG: &str = "image/png";
64pub(crate) const MIME_JPEG: &str = "image/jpeg";
65pub(crate) const MIME_WEBP: &str = "image/webp";
66pub(crate) const MIME_OCTET: &str = "application/octet-stream";
67pub(crate) const EXT_HTML: &str = "html";
68pub(crate) const EXT_JSON: &str = "json";
69pub(crate) const EXT_XML: &str = "xml";
70pub(crate) const EXT_CSS: &str = "css";
71pub(crate) const EXT_WASM: &str = "wasm";
72pub(crate) const EXT_SVG: &str = "svg";
73pub(crate) const EXT_PNG: &str = "png";
74pub(crate) const EXT_JPG: &str = "jpg";
75pub(crate) const EXT_JPEG: &str = "jpeg";
76pub(crate) const EXT_WEBP: &str = "webp";
77pub(crate) const ENV_DEV_URL: &str = "EUV_DEV_URL";
78pub(crate) const ENV_HMR_URL: &str = "EUV_HMR_URL";
79pub(crate) const ENV_OTA_MANIFEST_URL: &str = "EUV_OTA_MANIFEST_URL";
80pub(crate) const ENV_OTA_MODULE_URL: &str = "EUV_OTA_MODULE_URL";
81pub(crate) const HTML_BODY_CLOSE_TAG: &str = "</body>";
82pub(crate) const DEV_HMR_SCRIPT_PREFIX: &str = "<script>(function(){try{var es=new EventSource('";
83pub(crate) const DEV_HMR_SCRIPT_SUFFIX: &str = "');es.addEventListener('reload',function(){location.reload();});es.addEventListener('ota',function(){location.reload();});}catch(e){}})();</script>";
84pub(crate) const MSG_INITIAL_BUILD_READY: &str = "Initial build ready";
85pub(crate) const MSG_DOCS_REBUILT: &str = "Docs hot-rebuilt";
86pub(crate) const MSG_WEB_REBUILT: &str = "Web WASM hot-rebuilt";
87pub(crate) const MSG_NATIVE_RESTARTED: &str = "Native binary rebuilt and hot-restarted";
88pub(crate) const OTA_INITIAL_TITLE: &str = "Euv Dev OTA Initial Module";
89pub(crate) const SSE_PING_LINE: &str = ": ping\n\n";
90pub(crate) const EMPTY_JSON_OBJECT: &str = "{}";
91pub(crate) const ASCII_PERCENT: u8 = b'%';
92pub(crate) const ASCII_DIGIT_ZERO: u8 = b'0';
93pub(crate) const ASCII_DIGIT_NINE: u8 = b'9';
94pub(crate) const ASCII_LOWER_A: u8 = b'a';
95pub(crate) const ASCII_LOWER_F: u8 = b'f';
96pub(crate) const ASCII_UPPER_A: u8 = b'A';
97pub(crate) const ASCII_UPPER_F: u8 = b'F';