A comprehensive Rust style guide covering project structure, file structure, and function structure conventions. Key guidelines include preferring mod.rs over name.rs for directory modules, keeping directory-root modules as re-export-only, avoiding compound imports to reduce merge conflicts, ordering public items before private ones, grouping related logic with whitespace, and separating pure expressions from mutable side effects. Each rule includes rationale, examples of before/after code, and some include Clippy automation hints.
Table of contents
ChecklistPrinciplesProject structureSimple visibility (P-VISIBILITY)File structureFunction structureSort: