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 HMR_EVENT_RELOAD: &str = "reload";
40pub(crate) const HMR_EVENT_OTA: &str = "ota";
41pub(crate) const HMR_EVENT_ERROR: &str = "error";
42pub(crate) const HTTP_METHOD_HEAD: &str = "HEAD";
43pub(crate) const HTTP_METHOD_OPTIONS: &str = "OPTIONS";
44pub(crate) const HTTP_200_PREFIX: &str = "HTTP/1.1 200 OK\r\nContent-Type: ";
45pub(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";
46pub(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";
47pub(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";
48pub(crate) const HTTP_CORS_HEADERS: &str =
49 "\r\nCache-Control: no-cache\r\nAccess-Control-Allow-Origin: *\r\nContent-Length: ";
50pub(crate) const HTTP_CONN_CLOSE_SEP: &str = "\r\nConnection: close\r\n\r\n";
51pub(crate) const MIME_HTML: &str = "text/html; charset=utf-8";
52pub(crate) const MIME_JSON: &str = "application/json; charset=utf-8";
53pub(crate) const MIME_XML: &str = "application/xml; charset=utf-8";
54pub(crate) const MIME_CSS: &str = "text/css; charset=utf-8";
55pub(crate) const MIME_WASM: &str = "application/wasm";
56pub(crate) const MIME_SVG: &str = "image/svg+xml";
57pub(crate) const MIME_PNG: &str = "image/png";
58pub(crate) const MIME_JPEG: &str = "image/jpeg";
59pub(crate) const MIME_WEBP: &str = "image/webp";
60pub(crate) const MIME_OCTET: &str = "application/octet-stream";
61pub(crate) const EXT_HTML: &str = "html";
62pub(crate) const EXT_JSON: &str = "json";
63pub(crate) const EXT_XML: &str = "xml";
64pub(crate) const EXT_CSS: &str = "css";
65pub(crate) const EXT_WASM: &str = "wasm";
66pub(crate) const EXT_SVG: &str = "svg";
67pub(crate) const EXT_PNG: &str = "png";
68pub(crate) const EXT_JPG: &str = "jpg";
69pub(crate) const EXT_JPEG: &str = "jpeg";
70pub(crate) const EXT_WEBP: &str = "webp";
71pub(crate) const ENV_DEV_URL: &str = "EUV_DEV_URL";
72pub(crate) const ENV_HMR_URL: &str = "EUV_HMR_URL";
73pub(crate) const ENV_OTA_MANIFEST_URL: &str = "EUV_OTA_MANIFEST_URL";
74pub(crate) const ENV_OTA_MODULE_URL: &str = "EUV_OTA_MODULE_URL";
75pub(crate) const HTML_BODY_CLOSE_TAG: &str = "</body>";
76pub(crate) const DEV_HMR_SCRIPT_PREFIX: &str = "<script>(function(){try{var es=new EventSource('";
77pub(crate) const DEV_HMR_SCRIPT_SUFFIX: &str = "');es.addEventListener('reload',function(){location.reload();});es.addEventListener('ota',function(){location.reload();});}catch(e){}})();</script>";
78pub(crate) const MSG_INITIAL_BUILD_READY: &str = "Initial build ready";
79pub(crate) const MSG_DOCS_REBUILT: &str = "Docs hot-rebuilt";
80pub(crate) const MSG_WEB_REBUILT: &str = "Web WASM hot-rebuilt";
81pub(crate) const MSG_NATIVE_RESTARTED: &str = "Native binary rebuilt and hot-restarted";
82pub(crate) const OTA_INITIAL_TITLE: &str = "Euv Dev OTA Initial Module";
83pub(crate) const SSE_PING_LINE: &str = ": ping\n\n";
84pub(crate) const EMPTY_JSON_OBJECT: &str = "{}";