euv-macros 0.41.0

Zero-overhead procedural macros for the cross-platform euv UI framework, providing view!, style!, class!, tokens!, watch!, computed!, component, and euv_main!.
Documentation

euv-macros

Crates.io Version Crates.io Downloads Docs.rs CI Status License: MIT

API Docs · Macro Authoring Guidelines · Workspace README

Zero-overhead procedural macros for euv, compiling declarative UI, newline-separated styles, reactive bindings, component lifecycles, global/local state, and typed cross-component events directly into retained scene operations with full rust-analyzer Go-to-Definition support.

Provided Macros

Macro Purpose
view! { ... } Zero-context declarative scene construction with IDE Go-to-Definition on built-in tags (euv::view_elements), properties, and custom component structs
style! { ... } Compile-time newline-separated Style builder (one rule per line, no ;) with IDE Go-to-Definition via euv::style_props
#[component(retention = Freeze)] Splits impl MyComp into Lifecycle + Component with configurable retention (Freeze, Destroy, Alive)
#[event] / emit! / on_event! Typed cross-component EventBus declarations, dispatching, and scope-owned subscriptions
#[global_state_store] / global_state! / local_state! App-wide typed global state and scope-owned reactive local state
watch! / computed! / tokens! / euv_main! Concise reactive effects, memos, typed design tokens, and 7-platform app entry points

Installation

cargo add euv-macros

License

Licensed under the MIT License. See LICENSE for details.