FICHA · MANJARO

cargo-expand

Subcommand to show result of macro expansion

  • tool
  • CLI
  • Dev
  • DEBUGGING
  • Launchable
  • Runs in terminal
official+codex · reviewed · May 27, 2026 description in en

Description

Expands Rust macros and shows the generated code that the compiler sees. It helps developers debug derive macros, procedural macros, and complex macro-based APIs.

Use it when macro behavior is unclear or compiler errors point into generated code. Expanded output can be verbose, so inspect focused modules or examples when possible.

How to run

cargo expand

Commands: cargo expand

Permissions

Permissions not analysed for this source yet.