Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 1.34 KB

README.md

File metadata and controls

31 lines (20 loc) · 1.34 KB

Time to learn some rust!!

Installation

To install rust, follow the instructions on the official rust website.

Running the code

All rust code is in the src/bin directory. To run the code, use the command cargo run in the root directory of the project.

Each file in the src directory is a separate rust program. To run a specific program, use the command cargo run --bin <filename>.

eg: cargo run --bin variables

Each rust program is wrapped inside a main function. The main function is the entry point of the program.

Naming conventions

Convention Types that use it
snake_case Crates, modules, functions, methods, local variables and parameters, lifetimes.
CamelCase Types (including traits and enums), type parameters in generics.
SCREAMING_SNAKE_CASE Constant and static variables.

Order of learning

  1. Variables
  2. Data types
  3. Input and output
  4. Ownership
  5. Borrowing