#embed #template #macro #cli-template #cli

macro standout-macros

Proc macros for compile-time resource embedding in Standout

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

Download history 14/week @ 2026-01-26 11/week @ 2026-02-02 92/week @ 2026-02-09

117 downloads per month
Used in 3 crates (2 directly)

MIT license

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

Derive Macros

  • Dispatch - Generate dispatch configuration from clap Subcommand enums
  • Tabular - Generate TabularSpec from struct field annotations
  • TabularRow - Generate optimized row extraction without JSON serialization
  • Seekable - 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:

  1. Embedded content (baked into binary at compile time)
  2. 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 macros
  • standout/tests/dispatch_derive.rs - dispatch derive macro

Dependencies

~125–500KB
~12K SLoC