rust-call-graph

Generate ASCII or Mermaid call graphs for Rust functions via LSP.

Updated Feb 12, 2026
One-click install
npx skills add https://github.com/jmduea/emotiv-cortex-rs --skill rust-call-graph-jmduea
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust-call-graph
Source: https://github.com/jmduea/emotiv-cortex-rs/tree/main/.github/skills/rust-call-graph
Command: npx skills add https://github.com/jmduea/emotiv-cortex-rs --skill rust-call-graph-jmduea

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers often struggle to understand how functions interact across a Rust codebase, making debugging and architectural analysis time‑consuming.

Core Features & Use Cases

  • Generates call hierarchy diagrams for any function via LSP.
  • Supports inbound, outbound, or bidirectional visualizations with configurable depth.
  • Helpful for impact analysis, refactoring decisions, and onboarding new team members.

Quick Start

Ask the assistant to show the call graph for a function, for example “Show the call graph for process_request with depth 3.”

Frequently Asked Questions about rust-call-graph

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I visualize a Rust function call graph for impact analysis?

You can visualize a Rust function call graph by using LSP to analyze inbound, outbound, or bidirectional function interactions. This generates ASCII or Mermaid diagrams to help you understand architectural dependencies and impact.

What is the best way to map callers and callees in a Rust codebase?

Mapping callers and callees in a Rust codebase is done by generating a call hierarchy diagram via LSP. You can specify the direction to show inbound callers, outbound callees, or both for any selected function.

Does visualizing a Rust call graph require LSP support?

Yes, visualizing a Rust call graph requires LSP support. The tool relies on the Language Server Protocol to gather function interaction data and generate the corresponding ASCII or Mermaid diagrams.

How do I control the depth of a Rust call graph visualization?

You control the depth of a Rust call graph visualization by providing an optional depth parameter when requesting the diagram. This limits how many levels of callers or callees are included in the output.

Can I generate Mermaid diagrams for Rust function interactions?

Yes, you can generate Mermaid diagrams for Rust function interactions. The tool supports outputting both Mermaid and ASCII formats to help developers debug, analyze architecture, and make refactoring decisions.

What are the limitations of analyzing Rust function calls with LSP?

A limitation of analyzing Rust function calls with LSP is that it depends entirely on active LSP support to function. Without the Language Server Protocol running, the tool cannot extract the hierarchy data needed to generate the diagrams.