Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/aayushchugh/rust-basics

This repo contains basics of rust and specifically made for people already experienced in some other language.
https://github.com/aayushchugh/rust-basics

rust rust-basics rust-lang

Last synced: 29 days ago
JSON representation

This repo contains basics of rust and specifically made for people already experienced in some other language.

Awesome Lists containing this project

README

        

Time to learn some rust!!

## Installation

To install rust, follow the instructions on the [official rust website](https://www.rust-lang.org/tools/install).

## 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 `.

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](src/bin/variables.rs)
1. [Data types](src/bin/data_types.rs)
1. [Input and output](src/bin/input_output.rs)
1. [Ownership](src/bin/ownership.rs)
1. [Borrowing](src/bin/borrowing.rs)