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 clapSubcommandenums - [
Tabular] - GenerateTabularSpecfrom struct field annotations - [
TabularRow] - Generate optimized row extraction without JSON serialization
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