Loading...
Loading...
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.
npx skill4agent add pproenca/dot-skills rust| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 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 | |
mem-avoid-unnecessary-clonemem-preallocate-vec-capacitymem-use-cow-for-conditional-ownershipmem-use-arc-for-shared-immutable-datamem-avoid-format-for-simple-concatenationmem-use-smallvec-for-small-collectionsown-accept-str-slice-not-stringown-accept-slice-not-vecown-use-into-for-flexible-ownershipown-return-borrowed-when-possibleown-use-asref-for-generic-borrowsds-use-hashset-for-membershipds-use-hashmap-for-key-lookupds-use-btreemap-for-sorted-iterationds-use-vecdeque-for-queue-operationsds-use-entry-api-for-conditional-insertiter-chain-instead-of-intermediate-collectiter-use-iter-over-into-iter-when-borrowingiter-use-filter-map-for-combined-operationsiter-use-flat-map-for-nested-iterationiter-use-extend-for-bulk-appenditer-use-fold-for-accumulationasync-avoid-blocking-in-async-contextasync-use-join-for-concurrent-futuresasync-use-rwlock-over-mutex-for-read-heavyasync-minimize-lock-scopeasync-use-buffered-for-bounded-concurrencyasync-avoid-holding-lock-across-awaitalgo-avoid-nested-loops-for-lookupalgo-use-binary-search-for-sorted-dataalgo-use-sort-unstable-when-order-irrelevantalgo-use-select-nth-unstable-for-partial-sortalgo-use-chunks-for-batch-processingcomp-use-const-for-compile-time-computationcomp-prefer-static-dispatchcomp-reduce-monomorphization-bloatcomp-use-const-generics-for-array-sizescomp-avoid-repeated-parsing-of-static-datamicro-use-inline-for-small-functionsmicro-avoid-bounds-checks-in-hot-loopsmicro-use-wrapping-arithmetic-when-safemicro-use-byte-literals-for-ascii| 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 |