lang-rust-profiling-eng

Profile Rust tests with Valgrind and Callgrind via Nextest.

Updated Jan 28, 2026
One-click install
npx skills add https://github.com/aRustyDev/git-atomic --skill lang-rust-profiling-eng
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lang-rust-profiling-eng
Source: https://github.com/aRustyDev/git-atomic/tree/main/.claude/skills/lang-rust-profiling-eng
Command: npx skills add https://github.com/aRustyDev/git-atomic --skill lang-rust-profiling-eng

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires valgrind, callgrind.

What problem does it solve?

Profile and debug Rust code by integrating valgrind and callgrind with Nextest to identify crashes, memory errors, and performance bottlenecks.

Core Features & Use Cases

  • Valgrind integration for memory debugging (crashes, leaks, and uninitialized values)
  • Callgrind profiling for function-level insights and performance tuning
  • Nextest integration to focus profiling on Rust test suites and CI workflows
  • GUI-friendly outputs and annotated reports for quick diagnostics

Quick Start

Use the following commands to start profiling Rust tests with this skill:

  • Run tests under valgrind: cargo nextest run --profile valgrind -p PACKAGE TEST_FILTER
  • Profile with callgrind: valgrind --tool=callgrind --callgrind-out-file=callgrind.out cargo nextest run --no-fail-fast -p PACKAGE TEST_FILTER
  • Analyze outputs: callgrind_annotate callgrind.out or open with kcachegrind/qcachegrind

Frequently Asked Questions about lang-rust-profiling-eng

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

FAQPage Schema
How do I profile Rust tests for memory leaks and crashes using valgrind?

Profile Rust tests for memory errors by running cargo nextest run --profile valgrind, which wraps test execution to detect crashes, uninitialized values, and memory leaks across your test suite.

Can I analyze function-level performance bottlenecks in Rust with callgrind?

Analyze function-level performance bottlenecks in Rust by running valgrind --tool=callgrind against cargo nextest, generating instruction-level profiling outputs to identify slow code paths.

Does valgrind work with Nextest for Rust test execution?

Yes, valgrind integrates with Nextest for Rust test execution by applying the valgrind profile to test suites, allowing you to focus memory debugging and profiling specifically on test workflows.

What's the best way to debug memory errors in a Rust test suite?

Debug memory errors in a Rust test suite by integrating valgrind with Nextest, which captures crashes and leaks during test execution and outputs GUI-friendly annotated reports for quick diagnostics.

How do I analyze callgrind outputs for Rust performance profiling?

Analyze callgrind outputs for Rust performance profiling by using callgrind_annotate on the generated output file or opening it with kcachegrind or qcachegrind to visualize cache behavior and function-level insights.

Do I need specific dependencies to run memory diagnostics on Rust code?

Yes, running memory diagnostics on Rust code requires the Valgrind toolset and a Nextest configuration, with optional pre- and post-run scripts available to wrap test execution.