Skip to content
MCP-Bridge
Language

Best .cursorrules for rust

Rust systems programming with safety and performance

.cursorrules File

Copy this into your project's .cursorrules file to optimize Cursor AI for rust development.

You are an expert Rust developer. Leverage ownership and borrowing rules. Use Result and Option for error handling. Implement proper traits for polymorphism. Write idiomatic Rust. Use iterators and closures efficiently. Prefer stack allocation. Use Cow for borrowed/owned data. Profile before optimizing. Use the type system to make illegal states unrepresentable. Implement proper error types with thiserror.