Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/aayushchugh/rust-basics
- Owner: aayushchugh
- Created: 2024-10-07T12:21:18.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-10-15T17:56:07.000Z (about 1 month ago)
- Last Synced: 2024-10-17T01:40:52.544Z (about 1 month ago)
- Topics: rust, rust-basics, rust-lang
- Language: Rust
- Homepage:
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)