Commit Graph
2 Commits
Author SHA1 Message Date
Andrey VasnetsovandClaude Fable 5.1 29e21bea96 callgraph: accept struct/trait/enum/type/const roots (#10543)
rust-analyzer's call hierarchy is function-only, so a type root is walked
via find-references instead: each mention is attributed to its enclosing
document symbol (function, type definition, or impl block's self type),
and a type's callees are its methods. Type nodes are square; new edge
kinds `ref` and `member` get their own labels and legend entries.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-08 20:52:56 +02:00
Andrey VasnetsovandClaude Fable 5 afa9ecec1f Add tools/callgraph: interactive call-graph reports via rust-analyzer (#10422)
* Add tools/callgraph: interactive call-graph reports via rust-analyzer

Generates a self-contained HTML report for one function: pan/zoom graphviz
graph of callers and callees, per-node docs and source snippets, exact call
sites with context, GitHub/editor links.

- rust-analyzer call hierarchy over LSP gives resolved (not textual) edges;
  trait declarations and impls are bridged via goto-declaration /
  goto-implementation so dispatch through a trait doesn't dead-end the walk
- test code excluded by running rust-analyzer with cfg(test) disabled, plus
  path filters for tests/, benches/, examples/ targets
- no dependencies beyond rust-analyzer and graphviz on PATH

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RgxVoa6hfvgB7r6FVbcGmg

* Add screenshot to tools/callgraph README

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RgxVoa6hfvgB7r6FVbcGmg

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-09-01 11:32:24 +02:00