blinc_macros
Part of the Blinc UI Framework
This crate is a component of Blinc, a GPU-accelerated UI framework for Rust. For full documentation and guides, visit the Blinc documentation.
Procedural macros for Blinc UI.
Overview
blinc_macros provides derive macros for generating boilerplate code in Blinc applications.
Macros
BlincComponent
Generate component infrastructure including unique keys, animation hooks, and state management:
use BlincComponent;
Generated Code
The BlincComponent derive generates:
Attributes
#[animate]
Mark a field as animatable:
#[state]
Mark a field as reactive state:
// Usage:
counter.count.set;
let value = counter.count.get;
#[key]
Customize instance key generation:
// Instance key will use the `id` field
Instance Key Variants
// Single instance (default)
// Multiple instances with auto key
// Multiple instances with explicit key field
Requirements
- Rust 1.65+ (for proc-macro2 features)
synandquotefor macro implementation
License
MIT OR Apache-2.0