Rust Project CLAUDE.md Template
CLAUDE.md for Rust applications and libraries
Category:templates
Type:template
Difficulty:advanced
Language:Markdown
rust
cli
advanced
Description
CLAUDE.md template for Rust projects. Covers Cargo workspace setup, common patterns, error handling with thiserror/anyhow, async with Tokio, and testing strategies for Rust code.
Content
Resource Content
# Rust Project ## Overview Rust application/library with modern tooling. ## Tech Stack - Language: Rust (stable) - Async: Tokio - Web: Axum/Actix-web - Serialization: serde ## Key Commands ```bash cargo run # Run project cargo build --release # Release build cargo test # Run tests cargo clippy # Lint cargo fmt # Format code cargo doc --open # Generate docs ``` ## Project Structure ``` / ├── src/ │ ├── main.rs # Entry (binary) │ ├── lib.rs # Library root │ ├── error.rs # Error types │ └── modules/ # Feature modules ├── tests/ # Integration tests ├── benches/ # Benchmarks ├── Cargo.toml # Dependencies └── Cargo.lock # Lock file ``` ## Conventions - Use `Result<T, E>` for fallible ops - Implement `From` for error conversion - Prefer `&str` over `String` in params - Use `#[derive]` for common traits ## Important Notes - Run clippy before committing - Use `#[cfg(test)]` for test modules - Feature flags for optional deps
Rate This Resource
0
Help others discover great resources
Statistics
0
Stars
0
Copies
404
Days ago
358
Views
Related Resources
⚡
TypeScript Monorepo CLAUDE.md Template
CLAUDE.md for Turborepo/Nx monorepo projects
⚡
Next.js CLAUDE.md Template
Comprehensive CLAUDE.md for Next.js App Router projects
⚡
Python FastAPI CLAUDE.md Template
Complete CLAUDE.md for FastAPI backend projects
⚡
Node.js Express CLAUDE.md Template
Battle-tested CLAUDE.md for Express.js API projects