cargo-macra-0.1.0 is not a library.
cargo-macra

Interactive Rust macro expansion viewer with a terminal UI.
Motivation
cargo-macra is focused on understanding and debugging macro-heavy Rust code incrementally.
Instead of dumping all expanded code at once, it lets you step through expansions in source
context, which is useful for:
- learning how macro expansion works
- debugging complex macro crates where one macro expands into more macro calls
- investigating specific macro invocations when tools like rust-analyzer
expandMacroorcargo expandare too all-at-once for practical debugging
Install
From crates.io (when published)
From source
Usage
As a cargo subcommand:
Direct binary invocation:
Open a specific module first:
Print traced expansions without launching TUI:
CLI Options
Usage: cargo macra [OPTIONS] [MODULE] [CARGO_ARGS]...
Arguments:
[MODULE] Module path to open (e.g., "foo::bar")
[CARGO_ARGS]... Additional arguments to pass to cargo
Options:
-p, --package <PACKAGE> Package to check
--bin <BIN> Build only the specified binary
--lib Build only the specified library
--test <TEST> Build only the specified test target
--example <EXAMPLE> Build only the specified example
--manifest-path <MANIFEST_PATH> Path to Cargo.toml
--show-expansion Print expansions and exit
-h, --help Print help
TUI Keys
j/k,Up/Down: Move cursorg/G,Home/End: Jump top/bottomn/N: Jump next/previous macroEnter: Expand/collapse macro or entermodfileBackspace: Return to parent moduleTab/Shift+Tab: Move tree selectionSpace: Toggle child visibility in macro treer: Reload trace dataq/Esc: Quit
Development
License
MIT (stub files included in this repository; fill in copyright owner/year).