Euv-macros
Zero-Overhead Declarative UI, Style, Lifecycle & Reactive Proc Macros
Workspace Overview · API Docs · Agent Engineering Rules
Overview
Zero-overhead procedural macros for euv, compiling declarative UI (view!), newline-separated styles (style!), 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 and zero macro-emitted use statements.
Responsibilities & Module Layout
view! { ... }— Zero-cost minimal-codegen declarative scene construction requiring pre-boundstyle: card_stylereferences (inlinestyleblocks insideview!are rejected at compile time).#[derive(Props)]— ImplementsComponentPropsand span-preserving fluent named-prop setters (withimpl Into<String>forString,impl Into<Option<Style>>forOption<Style>enabling pre-boundStylevalues blocks,#[prop(custom)], and#[prop(default = expr)])style! { ... }— Compile-time keyless strongly-typedStylebuilder (Width(...),Padding(...),AlignItems::Center; one rule per line, no;).#[component(retention = Freeze)]— Splitsimpl MyCompintoLifecycle+Component(auto-emittingconst NEEDS_LIFECYCLE: boolso stateless components skipRcandNodeExtrasallocations on mount) with configurable retention (Freeze,Destroy,Alive)#[event]/emit!/on!— Typed cross-componentEventBusdeclarations, dispatching, and scope-owned subscriptions#[store]/state!— Unified scoped local state (state!(init)) and typed app-wide global state (state!(global Type)/state!(global Type = init))watch!/computed!/var!/#[euv]— Concise reactive effects, memos, typed design token constants, and unified cross-platform entry points (incl.euv_web_start,euv_miniapp_entry,euv_blueos_entry,euv_android_entry,euv_ios_entry,euv_harmony_entry,euv_wearable_entry)
Installation & Usage
Verification
Documentation & Governance
- Update this
README.mdalongside any public API, macro, component, CLI, or module-boundary change per../AGENTS.md. - Project standards and workflows live in
../.agents/skills/euv/SKILL.md.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contact
For inquiries, please contact the author at root@devhub.vip.