euv-macros 0.50.0

Zero-overhead procedural macros for the cross-platform euv UI framework, providing view!, style!, var!, watch!, computed!, state!, #[store], #[component], #[event], emit!, on!, and #[euv].
Documentation
/// Attribute key configuring the application window or document title (`title = "..."`).
pub(crate) const EUV_ATTR_TITLE: &str = "title";

/// Attribute key configuring initial logical window width (`width = 1280`).
pub(crate) const EUV_ATTR_WIDTH: &str = "width";

/// Attribute key configuring initial logical window height (`height = 800`).
pub(crate) const EUV_ATTR_HEIGHT: &str = "height";

/// Attribute key configuring the render pipeline mode (`render = auto | software | hardware | hybrid`).
pub(crate) const EUV_ATTR_RENDER: &str = "render";

/// Attribute key enabling deterministic offscreen headless startup (`headless = true`).
pub(crate) const EUV_ATTR_HEADLESS: &str = "headless";

/// Attribute key enabling borderless fullscreen presentation (`fullscreen = true`).
pub(crate) const EUV_ATTR_FULLSCREEN: &str = "fullscreen";

/// Render mode keyword for automatic backend selection.
pub(crate) const EUV_RENDER_AUTO: &str = "auto";

/// Render mode keyword for software rasterization.
pub(crate) const EUV_RENDER_SOFTWARE: &str = "software";

/// Render mode keyword for hardware GPU rendering.
pub(crate) const EUV_RENDER_HARDWARE: &str = "hardware";

/// Render mode keyword for hybrid GPU/CPU rendering.
pub(crate) const EUV_RENDER_HYBRID: &str = "hybrid";

/// Standard Rust entry function name intercepted and wrapped by `#[euv]`.
pub(crate) const ENTRY_FN_MAIN: &str = "main";

/// Internal renamed function identifier when `#[euv]` annotates `fn main(...)`.
pub(crate) const ENTRY_FN_INNER: &str = "__euv_entry_fn";

/// Type segment name identifying a `Result<App, ...>` custom app bootstrap function.
pub(crate) const ENTRY_TYPE_RESULT: &str = "Result";

/// Rust `cfg(target_arch = ...)` value for WebAssembly targets.
pub(crate) const CFG_ARCH_WASM32: &str = "wasm32";

/// Rust `cfg(target_os = ...)` value for WASI CLI/TUI targets.
pub(crate) const CFG_OS_WASI: &str = "wasi";

/// Rust `cfg(target_os = ...)` value for Android and WearOS targets.
pub(crate) const CFG_OS_ANDROID: &str = "android";

/// Rust `cfg(target_os = ...)` value for iOS and iPadOS targets.
pub(crate) const CFG_OS_IOS: &str = "ios";

/// Rust `cfg(target_os = ...)` value for Apple watchOS wearable targets.
pub(crate) const CFG_OS_WATCHOS: &str = "watchos";

/// Rust `cfg(target_os = ...)` value for Apple tvOS targets.
pub(crate) const CFG_OS_TVOS: &str = "tvos";

/// Rust `cfg(target_os = ...)` value for Apple visionOS targets.
pub(crate) const CFG_OS_VISIONOS: &str = "visionos";

/// Rust `cfg(target_os = ...)` value for NuttX / Xiaomi Vela wearable targets.
pub(crate) const CFG_OS_NUTTX: &str = "nuttx";

/// Rust `cfg(target_env = ...)` value for HarmonyOS / OpenHarmony targets.
pub(crate) const CFG_ENV_OHOS: &str = "ohos";

/// Error message when an unsupported key is passed inside `#[euv(...)]`.
pub(crate) 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(crate) 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(crate) const ERR_EUV_DUPLICATE_ATTR: &str = "duplicate `#[euv]` attribute option";

/// Error message when `#[euv]` is attached to a function taking parameters.
pub(crate) const ERR_EUV_NO_PARAMS: &str = "`#[euv]` entry function must take zero parameters";

/// Error message when `#[euv]` is attached to an `async fn`.
pub(crate) 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(crate) 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";