ClaudeRustPerformance
Rust Claude Rules
Claude rules for Rust: zero-cost abstractions, async with Tokio, error types, and high-performance Rust patterns.
CLAUDE.md
- Use Tokio for async runtime; prefer async-std only for WASM compatibility - Design error types with thiserror; implement From for error conversion chains - Use Arc<Mutex<T>> only when needed; prefer message passing with channels - Leverage Rust's zero-cost iterator abstractions; avoid collecting needlessly - Use cargo-flamegraph to profile; measure allocations with cargo-heaptrack - Enable LTO and set codegen-units = 1 in release profile for max performance - Write property-based tests with proptest for complex invariants - Use cargo-fuzz for security-sensitive parsing and deserialization code
How to use with Claude
Create a `CLAUDE.md` file in your project root. Claude Code reads this on startup and follows your conventions throughout the session.
#rust#tokio#async#claude#coding-rules
Related Rules
React Claude Rules
ClaudeReact
Claude rules for React: component design, state patterns, performance, and testing conventions in CLAUDE.md.
Architecture
react · claudeCopy Ready
Next.js Claude Rules
ClaudeNext.js
Claude rules for Next.js App Router: streaming, server actions, caching, and production deployment patterns.
Architecture
nextjs · claudeCopy Ready
Go Claude Rules
ClaudeGo
Claude rules for Go: project structure, error handling, testing, and idiomatic Go patterns.
Architecture
go · golangCopy Ready
SQL Claude Rules
ClaudeSQL
Claude rules for SQL and database design: schema conventions, query patterns, and migration safety.
Database
sql · databaseCopy Ready