Hotpath RS

v1.0.0Developer Toolsstable

Quickly find bottlenecks in Rust - one profiler for CPU, time, memory, and async code.

allocationsbenchmarkdebuggingmcpmpsc
Share:
1,510
Stars
0
Downloads
0
Weekly
0/5

What is Hotpath RS?

Hotpath RS is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to quickly find bottlenecks in rust - one profiler for cpu, time, memory, and async code.

Quickly find bottlenecks in Rust - one profiler for CPU, time, memory, and async code.

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Quickly find bottlenecks in Rust - one profiler for CPU, tim

Use Cases

Profile Rust code for CPU, memory, and async bottlenecks.
Identify performance issues across allocations, benchmarks, and timing.
pawurb

Maintainer

LicenseMIT
Languagerust
Versionv1.0.0
UpdatedMay 21, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx hotpath-rs

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Hotpath RS

Hotpath-rs is a Rust profiling library and MCP server that provides low-overhead CPU timing, memory allocation tracking, async/Tokio runtime monitoring, and channel throughput measurement — all in one unified tool. Developers annotate functions or blocks with simple macros and get a live TUI dashboard powered by ratatui, plus statistical summaries (average, total, p95, p99) on exit. The built-in MCP server lets AI assistants like Claude analyze profiling results and suggest optimizations without the developer manually interpreting flame graphs.

Prerequisites

  • Rust toolchain (stable, 1.75 or later recommended) with cargo installed
  • A Rust project with async code (Tokio) or synchronous code to profile
  • An MCP client such as Claude Desktop for using the MCP server mode
  • Optional: samply installed for CPU flame graph generation (cargo install samply)
1

Add hotpath to your Cargo.toml

Add the hotpath crate as a dependency and define the optional feature flags for the profiling modes you need.

[dependencies]
hotpath = "0.16"

[features]
hotpath = ["hotpath/hotpath"]
hotpath-cpu = ["hotpath/hotpath-cpu"]
hotpath-alloc = ["hotpath/hotpath-alloc"]
2

Annotate synchronous functions

Add the #[hotpath::measure] attribute macro to any synchronous function you want to profile. Hotpath automatically records call count, average time, and total time.

#[hotpath::measure]
fn expensive_computation(input: &[u8]) -> Vec<u8> {
    // your code here
}
3

Annotate your async main with hotpath::main

Wrap your Tokio async main with #[hotpath::main] to enable runtime monitoring and ensure the profiling report is printed on exit.

#[tokio::main]
#[hotpath::main]
async fn main() {
    // your application code
}
4

Profile arbitrary code blocks

Use the measure_block! macro to profile sections of code that are not entire functions, giving each block a descriptive label.

hotpath::measure_block!("database_query", {
    let results = db.query("SELECT * FROM users").await?;
    results
});
5

Run with profiling features enabled

Build and run your application with the hotpath and hotpath-alloc features enabled to collect timing and memory allocation data.

cargo run --features='hotpath,hotpath-alloc'

Hotpath RS Examples

Client configuration

claude_desktop_config.json entry for using hotpath-rs as an MCP server to analyze Rust profiling results.

{
  "mcpServers": {
    "hotpath-rs": {
      "command": "npx",
      "args": ["hotpath-rs"],
      "env": {}
    }
  }
}

Prompts to try

Questions and tasks to ask Claude with hotpath-rs profiling data available.

- "Analyze my hotpath profiling output and identify the top 3 bottlenecks"
- "My p99 latency for the database_query block is 450ms — what are likely causes?"
- "Show me which Tokio worker threads are most saturated in my async runtime"
- "Compare memory allocation rates between my cache-hit and cache-miss code paths"
- "Suggest optimizations for functions that have high call counts but low individual time"

Troubleshooting Hotpath RS

No profiling output appears when the program exits

Ensure you have added #[hotpath::main] to your async main function (or the sync equivalent) and built with the hotpath feature enabled (`--features='hotpath'`). Without the main macro, the report collection hook is not registered.

Memory allocation tracking shows zero allocations

The allocation tracker requires the hotpath-alloc feature. Run with `--features='hotpath,hotpath-alloc'`. Note that this feature replaces the global allocator, which may conflict with other custom allocators in your dependency tree.

Compile errors about conflicting feature flags

The hotpath-cpu feature enables samply-based CPU profiling and requires samply to be installed (`cargo install samply`). If you only need time and memory data, use only the hotpath and hotpath-alloc features without hotpath-cpu.

Frequently Asked Questions about Hotpath RS

What is Hotpath RS?

Hotpath RS is a Model Context Protocol (MCP) server that quickly find bottlenecks in rust - one profiler for cpu, time, memory, and async code. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Hotpath RS?

Follow the installation instructions on the Hotpath RS GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Hotpath RS?

Hotpath RS works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Hotpath RS free to use?

Yes, Hotpath RS is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "hotpath-rs": { "command": "npx", "args": ["-y", "hotpath-rs"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Hotpath RS?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides