rust-macro

Installation
SKILL.md

Macros vs Generics

Dimension Macros Generics
Flexibility Code transformation Type abstraction
Compile cost Incremental-friendly Monomorphization overhead
Error messages Can be cryptic Clear
Debugging Debug expanded code Direct debugging
Use case Reduce boilerplate Generic algorithms

Solution Patterns

Pattern 1: Declarative Macro (macro_rules!)

// Basic structure
macro_rules! my_vec {
Related skills
Installs
10
GitHub Stars
29
First Seen
Jan 28, 2026