rust

rust

Rust performance optimization guidelines. This skill should be used when writing, reviewing, or refactoring Rust code to ensure optimal performance patterns. Triggers on tasks involving memory allocation, ownership, borrowing, iterators, async code, or performance optimization.

5星標
0分支
更新於 1/24/2026
SKILL.md
readonlyread-only
name
rust
description

Rust performance optimization guidelines. This skill should be used when writing, reviewing, or refactoring Rust code to ensure optimal performance patterns. Triggers on tasks involving memory allocation, ownership, borrowing, iterators, async code, or performance optimization.

Community Rust Best Practices

Comprehensive performance optimization guide for Rust applications. Contains 42 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.

When to Apply

Reference these guidelines when:

  • Writing new Rust code
  • Optimizing memory allocation and ownership patterns
  • Working with iterators and collections
  • Writing async code with Tokio or other runtimes
  • Reviewing code for performance issues

Rule Categories by Priority

Priority Category Impact Prefix
1 Memory Allocation CRITICAL mem-
2 Ownership & Borrowing CRITICAL own-
3 Data Structure Selection HIGH ds-
4 Iterator & Collection Patterns HIGH iter-
5 Async & Concurrency MEDIUM-HIGH async-
6 Algorithm Complexity MEDIUM algo-
7 Compile-Time Optimization MEDIUM comp-
8 Micro-optimizations LOW micro-

Quick Reference

1. Memory Allocation (CRITICAL)

2. Ownership & Borrowing (CRITICAL)

3. Data Structure Selection (HIGH)

4. Iterator & Collection Patterns (HIGH)

5. Async & Concurrency (MEDIUM-HIGH)

6. Algorithm Complexity (MEDIUM)

7. Compile-Time Optimization (MEDIUM)

8. Micro-optimizations (LOW)

How to Use

Read individual reference files for detailed explanations and code examples:

Full Compiled Document

For a comprehensive guide with all rules in a single document, see AGENTS.md.

Reference Files

File Description
AGENTS.md Complete compiled guide with all rules
references/_sections.md Category definitions and ordering
assets/templates/_template.md Template for new rules
metadata.json Version and reference information

You Might Also Like

Related Skills

coding-agent

coding-agent

179Kdev-codegen

Run Codex CLI, Claude Code, OpenCode, or Pi Coding Agent via background process for programmatic control.

openclaw avataropenclaw
獲取
add-uint-support

add-uint-support

97Kdev-codegen

Add unsigned integer (uint) type support to PyTorch operators by updating AT_DISPATCH macros. Use when adding support for uint16, uint32, uint64 types to operators, kernels, or when user mentions enabling unsigned types, barebones unsigned types, or uint support.

pytorch avatarpytorch
獲取
at-dispatch-v2

at-dispatch-v2

97Kdev-codegen

Convert PyTorch AT_DISPATCH macros to AT_DISPATCH_V2 format in ATen C++ code. Use when porting AT_DISPATCH_ALL_TYPES_AND*, AT_DISPATCH_FLOATING_TYPES*, or other dispatch macros to the new v2 API. For ATen kernel files, CUDA kernels, and native operator implementations.

pytorch avatarpytorch
獲取
skill-writer

skill-writer

97Kdev-codegen

Guide users through creating Agent Skills for Claude Code. Use when the user wants to create, write, author, or design a new Skill, or needs help with SKILL.md files, frontmatter, or skill structure.

pytorch avatarpytorch
獲取

Implements JavaScript classes in C++ using JavaScriptCore. Use when creating new JS classes with C++ bindings, prototypes, or constructors.

oven-sh avataroven-sh
獲取

Creates JavaScript classes using Bun's Zig bindings generator (.classes.ts). Use when implementing new JS APIs in Zig with JSC integration.

oven-sh avataroven-sh
獲取