Skip to content
This repository was archived by the owner on Aug 12, 2025. It is now read-only.

Latest commit

 

History

History
46 lines (34 loc) · 1.33 KB

File metadata and controls

46 lines (34 loc) · 1.33 KB

Rust Style Guidelines

This project aims at providing a guideline for writing consistent Rust code, to reduce review friction and help new developers.

This is not a complete collection of all Rust style guidelines. If there are any style conflicts not clarified by this repository, please open an issue.

Other resources

There are numerous other resources which focus on de-facto standards in the Rust community. Unless otherwise specified, these common guidelines should be applied to all Rust code.

Notable examples:

Table of Contents

  1. Rustfmt
  2. Clippy
  3. Comments
  4. Imports
  5. Ordering
  6. Naming
  7. Error Handling
  8. Macros
  9. Tests
  10. Enums
  11. Structs
  12. Control Flow
  13. Functions
  14. Visibility

Contributing

If you wish to contribute a new rule, please use the SKELETON.md as a structural guideline.

License

MIT - with complete text available in the LICENSE file.