Expand description
euv-macros
Zero-overhead native procedural macros for the cross-platform euv UI framework,
compiling declarative view!, style!, var!, watch!, computed!,
state!, #[store], #[component], #[event], emit!, on!, and #[euv]
directly into arena scene graph operations with span-preserving IDE completion
and actionable compile-time diagnostics.
Macros§
- computed
- Ergonomic memoized derived signal macro with equality short-circuiting.
- emit
- Dispatches a typed cross-component custom event through
EventBus. - on
- Subscribes a scope-owned listener to a typed cross-component custom event (
on!(MyEvent => |ev| { ... })). - state
- Unified reactive state macro for scoped local state and typed app-wide global state.
- style
- Compile-time style macro compiling declarative newline-separated rules directly into typed
Styleconstructor functions or inlineStyleexpressions. - var
- Compile-time design token variable macro generating span-preserving typed
constitems. - view
- Declarative zero-VDOM, zero-context UI construction macro managing
Contextautomatically. - watch
- Ergonomic reactive side-effect macro watching one or more signals or a global state type.
Attribute Macros§
- component
- Attribute macro splitting an
impl MyComponent { fn render(&self) -> NodeId { ... } ... }block into cleanimpl Lifecycleandimpl Componentblocks. - euv
- Unified cross-platform application entry-point attribute macro (
#[euv]or#[euv(title = "...", width = 1280, height = 800)]). - event
- Attribute macro marking a struct as a typed cross-component
CustomEventwith ergonomic::emitand::onhelpers. - store
- Attribute macro turning a struct into a typed app-wide
GlobalStatestore with.provide(),::use_global(),::get_global(),::set_global(),::update_global(), and::watch_global().
Derive Macros§
- Props
- Derive macro implementing
ComponentPropsand span-preserving fluent named-prop setters forview! { MyComp { prop: value } }.