Programming Resources | Python | Javascript | Artificial Intelligence Updates | Computer Science Courses | AI Books
54.3K subscribers
880 photos
1 video
4 files
333 links
Everything about programming for beginners
* Python programming
* Java programming
* App development
* Machine Learning
* Data Science

Managed by: @love_data
Download Telegram
Introduction to Rust

What is Rust?

Rust is a systems programming language designed for performance, reliability, and safety. It aims to provide memory safety without using a garbage collector, which makes it an excellent choice for system-level programming and performance-critical applications.

(we can also use it as general purpose)

Reasons to Use Rust -

Memory Safety:

Rust’s ownership model and borrow checker prevent common bugs like use-after-free and data races
Performance
:
Rust offers low-level control and high performance similar to C/C++ without sacrificing safety


Concurrency

Safe concurrency abstractions make it easier to write multi-threaded programs


Modern Language Features

Rust has a rich type system, pattern matching, and powerful abstract



Growing eco system:
An expanding set of libraries and tools support a variety of applications, from web development to embedded systems.


Install Rust in Windows

Download the Rust installer:

Visit the official Rust website: https://www.rust-lang.org/tools/install
Click on the "Download rustup-init.exe" button.ο»Ώ


Run the installer:
After downloading rustup-init
.exe, run it.


Follow the installation prompts:

The installer will guide you through the
setup process.

Add Rust to the system PATH (if not automatically done):

The installer typically handles this, but if not, ensure that Rust's cargo binary directory is added to yo

ur system's PATH.

Verify the installation

Open Command Prompt or PowerShell and run:

rustc --version 

You should see the Rust version installed.

How to install Rust On macOS and Linux:

Open a terminal.
Run the following command:
   curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  

Follow the on-screen instructions: to install Rust. The installer will:
   - Download the required components.
   - Set up your environment.
   - Add cargo and rustc (Rust compiler) to your PATH.

Source your shell configurationon** (to immediately start using Rust without restarting the terminal):

   source $HOME/.cargo/env
  


#Verify the Installation:
After installation, you can verify it by checking the installed Rust version:

rustc --version

This should return the version of Rust installed.

Install Rust on Termux

Use just simple command:
pkg update
pkg install rust


Check installation
rustc --version


# Rust basic Code
fn main() {
    println!("Jay Shree Ganesha");
}


Like if you want more resources for Rust
❀13πŸ‘10πŸ‘2😁1πŸ‘Œ1