Skip to content
Researched developer tool comparisonsPrices dated · vendor sources linked · no star ratings
Search

Stage 04 · Run · Researched comparison

Best Rust Profilers in 2026

cargo-flamegraph is the first pick for most Rust developers. It turns perf or other sampling output into flame graphs and works on Linux and macOS. samply is a good alternative when you want an interactive profiler in the browser with no extra setup. For memory work, heaptrack and dhat-rs cover allocation tracking, while Instruments through cargo-instruments suits macOS-only teams.

By
Published 28 Nov 2026 · 7 tools compared

We run no ads and no affiliate links at launch. The order of a list follows our published method. See how we score.

Prices are the starting prices vendors list publicly. Plans change, so confirm the current price on the vendor page before you buy.

Key takeaways

  • cargo-flamegraph is free and open source and is the simplest way to get a flame graph from a Rust binary.
  • samply is free and open source and runs as a sampling profiler with a Firefox Profiler-based viewer.
  • perf and Instruments ship with their operating systems, so cost depends on the OS, not a separate licence.
  • Profilers read process memory and symbols, so avoid running them on production data unless you control the machine.

Who each pick is for

  • Rust developers who want quick CPU flame graphscargo-flamegraph
  • Developers who want an interactive sampling profilersamply
  • Linux developers who want low-level CPU profilingperf
  • macOS developers using Apple Instrumentscargo-instruments
  • Finding heap allocations and leaks in Rust programsheaptrack
  • Rust developers who want in-process heap profilingdhat-rs
  • Frame and timeline profiling with tracing-tracyTracy

Comparison

The 7 tools at a glance
ToolBest forStandout featureListed starting priceFree plan or trial
1cargo-flamegraphRust developers who want quick CPU flame graphsSimple cargo subcommandFree (open source)Free plan
2samplyDevelopers who want an interactive sampling profilerInteractive profile viewer in the browserFree (open source)Free plan
3perfLinux developers who want low-level CPU profilingShips with the Linux kernel toolingFreeFree plan
4cargo-instrumentsmacOS developers using Apple InstrumentsWraps Apple Instruments for cargo projectsFree (open source)Free plan
5heaptrackFinding heap allocations and leaks in Rust programsTracks allocations with backtracesFree (open source)Free plan
6dhat-rsRust developers who want in-process heap profilingPure Rust crate with a global allocatorFree (open source)Free plan
7TracyFrame and timeline profiling with tracing-tracyDetailed timeline and frame viewFree (open source)Free plan

How we picked

We picked tools that profile Rust binaries directly or through a documented Rust integration. Criteria were fit for CPU, heap or timeline work, platform support, licence and price, and how much code change each tool needs. We also considered whether a tool sends data off the machine. Sources are vendor pages, project repositories and documentation. Prices and licences can change, so confirm on the vendor site before you commit.

The tools, one by one

01

cargo-flamegraph

Best for rust developers who want quick CPU flame graphs

Visit github.com
cargo-flamegraph homepage
cargo-flamegraph homepage, captured Nov 2026

What it is and where it fits

cargo-flamegraph is a cargo subcommand that profiles a Rust binary and writes an SVG flame graph. On Linux it uses perf by default; on macOS it can use other backends. You run it as `cargo flamegraph` and pass your binary arguments after `--`.

It suits developers who want a fast visual of where CPU time goes without learning a profiler UI. The output is a static SVG, so you read it after the run rather than interactively. It does not cover heap allocation or async task timing on its own.

Skip it if you need an interactive timeline or memory profiling. It is free and open source under the MIT and Apache-2.0 licences.

Standout: Simple cargo subcommand

Pricing pointer

Free (open source), as listed by the vendor (cargo-flamegraph website). Confirm the current plan price before you buy.

Free plan. Plans change, so confirm on the vendor's pricing page before you buy.

Benefits

  • Simple cargo subcommand
  • Produces SVG flame graphs from a running binary

Drawbacks

  • Depends on a system profiler underneath
  • Limited to CPU sampling views

Skip it if this limit matters to you: depends on a system profiler underneath.

Verdict. A sensible pick for rust developers who want quick CPU flame graphs.

Alternatives in this guide: samply, perf, cargo-instruments

02

samply

Best for developers who want an interactive sampling profiler

Visit github.com
samply homepage
samply homepage, captured Nov 2026

What it is and where it fits

samply is a sampling profiler that records a profile and opens it in a local web viewer based on the Firefox Profiler. You run `samply record ./target/release/myapp` and it captures stacks while the program runs.

It is useful when a static flame graph is not enough and you want to zoom into call trees, threads and time ranges. It runs on Linux and macOS. Build with debug symbols or a release profile that keeps symbols to get readable frames.

It does not track heap allocations. Skip it if you need allocation-level detail; use a memory tool instead. It is free and open source under the MIT and Apache-2.0 licences.

Standout: Interactive profile viewer in the browser

Pricing pointer

Free (open source), as listed by the vendor (samply website). Confirm the current plan price before you buy.

Free plan. Plans change, so confirm on the vendor's pricing page before you buy.

Benefits

  • Interactive profile viewer in the browser
  • Works on Linux and macOS

Drawbacks

  • Requires symbols for useful output
  • Not a memory profiler

Skip it if this limit matters to you: requires symbols for useful output.

Verdict. A sensible pick for developers who want an interactive sampling profiler.

Alternatives in this guide: cargo-flamegraph, perf, cargo-instruments

03

perf

Best for linux developers who want low-level CPU profiling

Visit perf.wiki.kernel.org
Pperfperf.wiki.kernel.org
Homepage screenshot not available; visit the vendor site.

What it is and where it fits

perf is the Linux kernel's profiling tool. It records CPU samples with `perf record` and reports them with `perf report`. It can also produce data that cargo-flamegraph turns into flame graphs.

It is the base layer for many Rust profiling workflows on Linux. It supports hardware counters, software events and call graph capture when the kernel and permissions allow it. Some features need `perf_event_paranoid` settings or root access.

It is Linux only and has a large set of subcommands, so expect time to learn it. Skip it on macOS or Windows. It is free and part of the Linux kernel project.

Standout: Ships with the Linux kernel tooling

Pricing pointer

Free, as listed by the vendor (perf website). Confirm the current plan price before you buy.

Free plan. Plans change, so confirm on the vendor's pricing page before you buy.

Benefits

  • Ships with the Linux kernel tooling
  • Deep hardware and software event support

Drawbacks

  • Linux only
  • Steep command-line learning curve

Skip it if this limit matters to you: linux only.

Verdict. A sensible pick for linux developers who want low-level CPU profiling.

Alternatives in this guide: cargo-flamegraph, samply, cargo-instruments

04

cargo-instruments

Best for macOS developers using Apple Instruments

Visit github.com
cargo-instruments homepage
cargo-instruments homepage, captured Nov 2026

What it is and where it fits

cargo-instruments runs a Rust binary under Apple Instruments and can open the resulting trace. It supports templates such as time profiler and allocations, so you can profile CPU or memory from the command line.

It suits macOS developers who already use Instruments and want a cargo-friendly entry point. You need Xcode and its command line tools installed. The trace opens in the Instruments app for inspection.

It is macOS only, so Linux and Windows teams should look elsewhere. The wrapper is free and open source; Instruments itself comes with Xcode. Skip it if you cannot install Xcode.

Standout: Wraps Apple Instruments for cargo projects

Pricing pointer

Free (open source), as listed by the vendor (cargo-instruments website). Confirm the current plan price before you buy.

Free plan. Plans change, so confirm on the vendor's pricing page before you buy.

Benefits

  • Wraps Apple Instruments for cargo projects
  • Supports several Instruments templates

Drawbacks

  • macOS and Xcode only
  • Requires Xcode command line tools

Skip it if this limit matters to you: macOS and Xcode only.

Verdict. A sensible pick for macOS developers using Apple Instruments.

Alternatives in this guide: cargo-flamegraph, samply, perf

05

heaptrack

Best for finding heap allocations and leaks in Rust programs

Visit github.com
heaptrack homepage
heaptrack homepage, captured Nov 2026

What it is and where it fits

heaptrack is a heap profiler from KDE. It records every allocation and free, then reports peak memory, leaks and allocation hotspots with backtraces. You run `heaptrack ./target/release/myapp` and analyze the output with `heaptrack_gui` or `heaptrack_print`.

It is useful for Rust programs that allocate heavily or show rising memory. It works best on Linux. For full backtraces, build with debug symbols. Some allocator setups need extra configuration to be traced well.

It is not a CPU profiler, so pair it with a sampling tool. Skip it on macOS or Windows. It is free and open source under the LGPL and GPL licences.

Standout: Tracks allocations with backtraces

Pricing pointer

Free (open source), as listed by the vendor (heaptrack website). Confirm the current plan price before you buy.

Free plan. Plans change, so confirm on the vendor's pricing page before you buy.

Benefits

  • Tracks allocations with backtraces
  • GUI and command-line analysis

Drawbacks

  • Linux focused
  • Needs allocator hooks to see full detail

Skip it if this limit matters to you: linux focused.

Verdict. A sensible pick for finding heap allocations and leaks in Rust programs.

Alternatives in this guide: cargo-flamegraph, samply, perf

06

dhat-rs

Best for rust developers who want in-process heap profiling

Visit github.com
dhat-rs homepage
dhat-rs homepage, captured Nov 2026

What it is and where it fits

dhat-rs is a Rust crate that provides a heap profiler as a global allocator. You add it to your program, run it, and it writes a JSON profile you open in the DhAT viewer. It records allocation sites and lifetimes.

It suits developers who want heap data without an external profiler or OS support. Because it is a crate, it works across platforms where Rust runs. The tradeoff is that you must modify the program to use it, usually behind a feature flag.

It does not profile CPU time. Skip it if you cannot rebuild the program with the allocator swapped in. It is free and open source under the MIT and Apache-2.0 licences.

Standout: Pure Rust crate with a global allocator

Pricing pointer

Free (open source), as listed by the vendor (dhat-rs website). Confirm the current plan price before you buy.

Free plan. Plans change, so confirm on the vendor's pricing page before you buy.

Benefits

  • Pure Rust crate with a global allocator
  • Output viewable in a browser viewer

Drawbacks

  • Requires code changes to enable
  • Heap profiling only

Skip it if this limit matters to you: requires code changes to enable.

Verdict. A sensible pick for rust developers who want in-process heap profiling.

Alternatives in this guide: cargo-flamegraph, samply, perf

07

Tracy

Best for frame and timeline profiling with tracing-tracy

Visit github.com
Tracy homepage
Tracy homepage, captured Nov 2026

What it is and where it fits

Tracy is a frame and timeline profiler. For Rust, the tracing-tracy crate connects the tracing ecosystem to the Tracy client, so spans and events show up in the Tracy viewer. You instrument code with tracing and run the Tracy capture tool.

It suits game and real-time developers who care about frame timing and zone-level detail. It requires adding instrumentation, so it is not a drop-in sampler. The viewer runs on Windows, Linux and macOS.

It is not a heap profiler and needs more setup than cargo-flamegraph. Skip it for a quick one-off CPU look. It is free and open source under the BSD 3-Clause licence.

Standout: Detailed timeline and frame view

Pricing pointer

Free (open source), as listed by the vendor (Tracy website). Confirm the current plan price before you buy.

Free plan. Plans change, so confirm on the vendor's pricing page before you buy.

Benefits

  • Detailed timeline and frame view
  • Rust integration through tracing-tracy

Drawbacks

  • Needs instrumentation in code
  • Heavier setup than a sampler

Skip it if this limit matters to you: needs instrumentation in code.

Verdict. A sensible pick for frame and timeline profiling with tracing-tracy.

Alternatives in this guide: cargo-flamegraph, samply, perf

Who should use what

If you want a quick CPU flame graph on Linux or macOS, start with cargo-flamegraph. If you prefer an interactive timeline, use samply. If you are on macOS and already use Xcode, cargo-instruments fits that workflow. For memory problems, use heaptrack on Linux or dhat-rs when you can rebuild with a custom allocator. Teams that need frame-level timing should add Tracy with tracing-tracy.

Questions to settle before you buy

What to check before you buy

  • Confirm the tool runs on your OS and target architecture.
  • Check whether you need debug symbols for readable stacks.
  • Decide if you can rebuild the program or need a drop-in sampler.
  • Review the licence if you ship or redistribute the tool.
  • Check that profiling data stays local and does not include secrets.

FAQ

What is the best Rust profiler for beginners?

cargo-flamegraph is the easiest start. It is one cargo subcommand and produces an SVG flame graph you can read right away. You still need a working system profiler underneath, such as perf on Linux.

Do Rust profilers work on Windows?

Some do. Tracy runs on Windows, and dhat-rs works wherever Rust runs because it is a crate. perf and cargo-instruments are Linux and macOS only, so Windows users should check each tool's platform support first.

Can I profile a release build?

Yes, but keep symbols. Release builds strip or omit debug info by default, which makes stacks hard to read. Set a debug profile or keep symbols in the release build when you profile.

Is profiling data sensitive?

It can be. Profiles include function names, file paths and sometimes memory contents. Run profilers on your own machine or a controlled environment, and avoid profiling production systems with real user data.

Are these tools free?

All seven listed here are free and open source or ship with the OS. perf is part of the Linux kernel, and Instruments comes with Xcode. Check each licence before redistributing a tool.

Sources we checked

Method: how we score · editorial policy.

  1. cargo-flamegraph (official site)
  2. samply (official site)
  3. perf (official site)
  4. cargo-instruments (official site)
  5. heaptrack (official site)
  6. dhat-rs (official site)
  7. Tracy (official site)

Change log. First published 28 Nov 2026.