Back to list
pluginagentmarketplace

rust-performance

by pluginagentmarketplace

Rust programming language roadmap plugin for Claude

1🍴 0📅 Jan 5, 2026

SKILL.md


name: rust-performance description: Master Rust performance - profiling, benchmarking, and optimization sasmp_version: "1.3.0" bonded_agent: rust-debugger-agent bond_type: SECONDARY_BOND version: "1.0.0"

Rust Performance Skill

Master performance optimization: profiling, benchmarking, and zero-cost abstractions.

Quick Start

Benchmarking

[dev-dependencies]
criterion = { version = "0.5", features = ["html_reports"] }

[[bench]]
name = "my_bench"
harness = false
use criterion::{criterion_group, criterion_main, Criterion, black_box};

fn benchmark(c: &mut Criterion) {
    c.bench_function("fib", |b| {
        b.iter(|| fibonacci(black_box(20)))
    });
}

criterion_group!(benches, benchmark);
criterion_main!(benches);

Profiling

cargo install flamegraph
cargo flamegraph --bin my-app

Optimization Patterns

Avoid Allocations

// ❌ Allocates each iteration
for s in strings {
    result = result + &s;
}

// ✅ Pre-allocate
let mut result = String::with_capacity(total_len);
for s in strings {
    result.push_str(&s);
}

Use Iterators

// ❌ Intermediate collection
let v: Vec<_> = data.iter().map(|x| x * 2).collect();
let sum: i32 = v.iter().sum();

// ✅ Lazy chain
let sum: i32 = data.iter().map(|x| x * 2).sum();

Cow for Optional Clone

use std::borrow::Cow;

fn process(input: &str) -> Cow<str> {
    if input.contains("bad") {
        Cow::Owned(input.replace("bad", "good"))
    } else {
        Cow::Borrowed(input)
    }
}

Release Profile

[profile.release]
lto = true
codegen-units = 1
opt-level = 3

Troubleshooting

ProblemSolution
Slow debugUse --release
Memory spikesUse streaming
Cache missesImprove data layout

Resources

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon