22 stable releases (6 major)
| new 7.0.0 | Feb 17, 2026 |
|---|---|
| 6.2.0 | Feb 15, 2026 |
| 5.0.0 | Feb 3, 2026 |
| 4.0.0 | Feb 2, 2026 |
| 1.1.0 | Jan 18, 2026 |
#2708 in Procedural macros
117 downloads per month
Used in 3 crates
(2 directly)
150KB
3K
SLoC
Proc macros for Standout.
This crate provides macros for compile-time resource embedding and declarative command dispatch configuration.
Available Macros
Embedding Macros
embed_templates!- Embed template files (.jinja,.jinja2,.j2,.txt)embed_styles!- Embed stylesheet files (.yaml,.yml)
Derive Macros
Dispatch- Generate dispatch configuration from clapSubcommandenumsTabular- GenerateTabularSpecfrom struct field annotationsTabularRow- Generate optimized row extraction without JSON serializationSeekable- Generate query-enabled accessor functions for Seeker
Attribute Macros
handler- Transform pure functions into Standout-compatible handlers
Design Philosophy
These macros return EmbeddedSource types that contain:
- Embedded content (baked into binary at compile time)
- Source path (for debug hot-reload)
This design enables:
- Release builds: Use embedded content, zero file I/O
- Debug builds: Hot-reload from disk if source path exists
Examples
For working examples, see:
standout/tests/embed_macros.rs- embedding macrosstandout/tests/dispatch_derive.rs- dispatch derive macro
Dependencies
~125–500KB
~12K SLoC