RUST 01 — Installation and some basics

Yen
May 7, 2023

💧Catalogue

  • Installation
  • Data Types
  • Functions
  • match expression
  • basic arithmetic

🔥Good Resources

ZeroToMastery | RUST

Codes in Github

⚡Installation

  • Install RUST
  • Path in environment variables(C:\Users\YOURNAME\.cargo\bin)
  • Create first project

⚡Data Types

  • int
  • boolean
  • float / double
  • character
  • string

🔸Variables

🔸mutable / immutable

This is also allowed.

output : 5

⚡functions

Another example.

⚡Control Flow

🔸if expressions

Output: 5

🔸Loop

Infinite loop.

🔸Conditional loop with while

This works as well.

⚡Match expression

🔸Boolean match

Output: Yeaaa!

🔸number match

⚡Basic Arithmetic

Output: 35

--

--

Yen

Programming is a mindset. Cybersecurity is the process. Focus on Python & Rust currently. More about me | https://msha.ke/monles