Generally speaking, code will be stylized following industry standard for the rust language. There are few exceptions and these are noted below.
- Favor strongly typed vs untyped data.
- Favor structs over json.
- Favor collections over arrays.
- It's not done until comments, documentation and scripts are complete.
- Design for SOLID, SOC and DRY
Snake case is not to be used for the following:
- crates
- mods
- file names
- traits
- structures
- enums and enum members
An exception is made for non public test mod
.
Any form of code that is done in a list
like pattern must be alphabetical unless noted otherwise.
Keep these alphabetical and only in the main source file for a crate (main.rs or lib.rs). List crates
imported in Cargo.toml
first following those imported from this project.
Keep these alphabetical. List uses
imported from extern crates first, following those imported from this project.
Consider creating a rustfmt.toml to enforce formatting.