# tfpk/macrokata

Learn Macros In Rust

Repository: https://github.com/tfpk/macrokata
Canonical: https://ross.abutalabs.com/products/macrokata
Homepage: https://tfpk.github.io/macrokata
Language: Rust
License: Apache-2.0
License Family: permissive
Topics: macros, rust
Last push: 2024-07-13T11:22:36+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 1415, "days_push": 781, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1219, forks 88 (observed 2026-08-28T04:04:01.813671+00:00)

## What it is
MacroKata is a set of ordered, hands-on exercises for learning how to write declarative macros (macro_rules!) in Rust. It ships with a small CLI binary that verifies each solution by checking that your code compiles, runs correctly, and expands to the same code as the reference solution.

## Use cases
- learn how to write macros in rust
- practice writing macro_rules declarative macros
- hands-on exercises for rust macros
- understand what my rust macro expands to
- rust macro tutorial with graded tasks
- improve rust metaprogramming skills through kata

## When to choose
- You already know basic Rust and want structured practice writing declarative macros
- You learn best by completing exercises with verifiable, compiler-checked goals
- You want to compare your macro expansion against a reference solution using cargo-expand

## When to avoid
- You want to learn procedural macros - use dtolnay's proc-macro-workshop instead
- You are completely new to Rust and have not finished a beginner tutorial yet
- You need a production macro library or tool rather than learning material

## Facets
- artifact type: learning-resource
- maturity: stable
- function: developer-tools, cli, testing
- domain: education, developer-tools, programming-languages, tutorials
- platform: rust, cli, cross-platform
- tags: rust-macros, declarative-macros, macro-rules, kata, exercises, cargo-expand, hands-on-learning

## Member repositories
- tfpk/macrokata (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:01.813671+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:16:42.871448+00:00, confidence not recorded.
  - readme: https://github.com/tfpk/macrokata (fetched 2026-08-28T04:04:01.813671+00:00, sha 4e47cf80d14c)
  - homepage: https://tfpk.github.io/macrokata (fetched 2026-08-29T12:24:33.261863+00:00, sha 6700914b60f2)
- Data as of 2026-08-30T08:39:29.467469+00:00.
