1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/// Attribute key configuring the application window or document title (`title = "..."`).
pub const EUV_ATTR_TITLE: &str = "title";
/// Attribute key configuring initial logical window width (`width = 1280`).
pub const EUV_ATTR_WIDTH: &str = "width";
/// Attribute key configuring initial logical window height (`height = 800`).
pub const EUV_ATTR_HEIGHT: &str = "height";
/// Attribute key configuring the render pipeline mode (`render = auto | software | hardware | hybrid`).
pub const EUV_ATTR_RENDER: &str = "render";
/// Attribute key enabling deterministic offscreen headless startup (`headless = true`).
pub const EUV_ATTR_HEADLESS: &str = "headless";
/// Attribute key enabling borderless fullscreen presentation (`fullscreen = true`).
pub const EUV_ATTR_FULLSCREEN: &str = "fullscreen";
/// Render mode keyword for automatic backend selection.
pub const EUV_RENDER_AUTO: &str = "auto";
/// Render mode keyword for software rasterization.
pub const EUV_RENDER_SOFTWARE: &str = "software";
/// Render mode keyword for hardware GPU rendering.
pub const EUV_RENDER_HARDWARE: &str = "hardware";
/// Render mode keyword for hybrid GPU/CPU rendering.
pub const EUV_RENDER_HYBRID: &str = "hybrid";
/// Standard Rust entry function name intercepted and wrapped by `#[euv]`.
pub const ENTRY_FN_MAIN: &str = "main";
/// Internal renamed function identifier when `#[euv]` annotates `fn main(...)`.
pub const ENTRY_FN_INNER: &str = "__euv_entry_fn";
/// Type segment name identifying a `Result<App, ...>` custom app bootstrap function.
pub const ENTRY_TYPE_RESULT: &str = "Result";
/// Rust `cfg(target_arch = ...)` value for WebAssembly targets.
pub const CFG_ARCH_WASM32: &str = "wasm32";
/// Rust `cfg(target_os = ...)` value for WASI CLI/TUI targets.
pub const CFG_OS_WASI: &str = "wasi";
/// Rust `cfg(target_os = ...)` value for Android and WearOS targets.
pub const CFG_OS_ANDROID: &str = "android";
/// Rust `cfg(target_os = ...)` value for iOS and iPadOS targets.
pub const CFG_OS_IOS: &str = "ios";
/// Rust `cfg(target_os = ...)` value for Apple watchOS wearable targets.
pub const CFG_OS_WATCHOS: &str = "watchos";
/// Rust `cfg(target_os = ...)` value for Apple tvOS targets.
pub const CFG_OS_TVOS: &str = "tvos";
/// Rust `cfg(target_os = ...)` value for Apple visionOS targets.
pub const CFG_OS_VISIONOS: &str = "visionos";
/// Rust `cfg(target_os = ...)` value for NuttX / Xiaomi Vela wearable targets.
pub const CFG_OS_NUTTX: &str = "nuttx";
/// Rust `cfg(target_env = ...)` value for HarmonyOS / OpenHarmony targets.
pub const CFG_ENV_OHOS: &str = "ohos";
/// Error message when an unsupported key is passed inside `#[euv(...)]`.
pub const ERR_EUV_UNKNOWN_ATTR: &str = "unknown `#[euv]` attribute — supported keys are `title`, `width`, `height`, `render`, `headless`, `fullscreen`";
/// Error message when an invalid render mode is passed to `#[euv(render = ...)]`.
pub const ERR_EUV_INVALID_RENDER: &str =
"invalid `#[euv(render = ...)]` mode — expected `auto`, `software`, `hardware`, or `hybrid`";
/// Error message when a duplicate option is passed inside `#[euv(...)]`.
pub const ERR_EUV_DUPLICATE_ATTR: &str = "duplicate `#[euv]` attribute option";
/// Error message when `#[euv]` is attached to a function taking parameters.
pub const ERR_EUV_NO_PARAMS: &str = "`#[euv]` entry function must take zero parameters";
/// Error message when `#[euv]` is attached to an `async fn`.
pub const ERR_EUV_NO_ASYNC: &str =
"`#[euv]` entry function must be synchronous (remove `async`)";
/// Error message when window options are passed to a non-`NodeId` `#[euv]` function.
pub const ERR_EUV_WINDOW_OPTS_NODE_ONLY: &str = "`#[euv]` window/render options (`title`, `width`, `height`, `render`, `headless`, `fullscreen`) apply only to `fn app() -> NodeId` entry functions";