Skip to content

yogithesymbian/rust_basic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c5caf83 · Jan 10, 2025

History

14 Commits
Jan 9, 2025
Jan 10, 2025
Jan 7, 2025
Jan 9, 2025
Jan 9, 2025
Jan 7, 2025

Repository files navigation

RUST BASIC Powered By AI

Welcome to the Rust Basics repository, a collection of foundational Rust programming topics. This project is designed to help learners get started with Rust by exploring key concepts such as variables, data types, control flow, and more.

Overview

Rust is a systems programming language that emphasizes performance, safety, and concurrency. This repository will guide you through some of the most important and basic features of the language.

Topics Covered

Here is an organized list of topics with a brief description for each:

Topic Description
Hello World A simple "Hello, World!" program to get started with Rust.
Cargo Learn how to use Cargo, the Rust package manager and build system.
Unit Test Writing and running unit tests to ensure code correctness.
Variable Understanding variable declarations, mutability, and scoping.
Comment Using comments in Rust code for clarity and documentation.
Data Type Exploring the basic data types available in Rust (e.g., integers, floats, booleans, etc.).
Number Working with numeric types, including integer and floating-point numbers.
Numeric Operations Performing basic arithmetic operations like addition, subtraction, and multiplication.
Boolean Understanding boolean values and their role in logic and conditions.
Comparison Operators Using comparison operators (e.g., ==, !=, <, >) to compare values.
Boolean Operators Using logical boolean operators (AND, OR, NOT) to combine boolean values.
Char Working with characters and understanding the char data type.
Array Introduction to arrays in Rust and how to work with them.
Constant Defining and using constants in Rust to store fixed values.
Variable Scope Understanding the scope of variables and how they affect code behavior.

How to Run the Code

To run the examples in this repository:

  1. Clone the repository to your local machine:

    git clone https://github.com/yogithesymbian/rust_basic.git
    cd rust_basic
  2. Make sure you have Rust installed on your machine. If not, you can install it from Rust's official site.

  3. Each topic is separated into a src file (e.g., src/hello_world.rs, src/cargo.rs). You can compile and run the code in any of these files with Cargo:

    cargo run --example hello_world

    Replace hello_world with the name of any example you want to run.

Contributing

Feel free to fork the repository, make changes, and create pull requests to contribute new examples, improve documentation, or fix bugs.

License

This project is licensed under the MIT License - see the LICENSE file for details.


Thank you for exploring Rust with this basic guide! 🎉

About

RUST BASIC Powered By AI

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages