I'm writing this while learning Rust, so everything I write here is the basic things someone starting to learn Rust should know. So let's start with some history.

Rust History

Graydon Hoare, a Research employee at Mozilla started Rust as a personal project in the year 2006. Then later, Mozilla began sponsoring the project in 2009 as a part of the ongoing development of an experimental browser engine called Servo, which was announced in 2010.

The first release was on May 15th, 2015.

List of Basic Rust Knowledge

fn main(){
//Dont do this
let x = 5;
println!(x);
//This will throw an error.

//Do this instead.
 println!("{}", 1); 
 // or
 println!("{}", x);
 
 //Output is 1 or 5 for the variables x.
}

fn main(){
  println!("Becoming the in the {0} is very important. So be {1}.", "industry", "patient");

  //output
  // Becoming the in the industry is very important. So be patient.  
}
fn main(){
  println!("{blog_name} provides {type} needed.", blog_name="devBox", type="informations");
  
  //output
  //devBox provides informations needed.
}

fn main(){
  //---print!()---
  //The following example prints “Rust Programming is fun, right?John is coding in Rust, cool right?” in one line.
  
    print!("Rust Programming is fun, right?");
    print!("John is coding in Rust, cool right?");
    
  //output Rust Programming is fun, right?John is coding in Rust, cool right? -- same line
  
  
  // ---println!()---
  //The following example prints “Rust Programming is fun, right?” on one line and “"John is coding in Rust, cool right?” on the new line.
  
    println!("Rust Programming is fun, right?");
    println!("John is coding in Rust, cool right?");
    
    /*
    output:
    Rust Programming is fun, right? --line
    John is coding in Rust, cool right? --another line
    */
    
  //---eprint!()---
  //The following example prints “Rust Programming is fun, right?” and “John is coding in Rust, cool right?” on the same line but as an error.
    eprint!("Rust Programming is fun, right?");
    eprint!("John is coding in Rust, cool right?");
    
     //output Rust Programming is fun, right?John is coding in Rust, cool right? -- same line
     
  // ---eprintln!()---
  //The following example prints “Rust Programming is fun, right?” as an error and appends a new line to it. Then prints “John is coding in Rust, cool right?” and appends a new line.
  
    println!("Rust Programming is fun, right?");
    println!("John is coding in Rust, cool right?");
    
    /*
    output as errors:
    Rust Programming is fun, right? --line
    John is coding in Rust, cool right? --another line
    */
    
}
 /// Outer Doc Comment

fn main() {
    // Line Comments
    //Example:
    //let mut x = 5;
    
    /*
    Block Comment
    Example:
    You can use the block comment when you want to disable a lengthy blocks of code
    let mut x = 5;
    */
    
   //! Inner Doc Comments
}
fn main(){
  let char_letter = 'a';
  println!("{}", char_letter)

  // output: a
}

Concept to Know

Variables and Mutability:

fn main() {
    let x = 5;  // Immutable variable
    let mut y = 10;  // Mutable variable
    y = 15;  // Updating the value of a mutable variable
    println!("x: {}, y: {}", x, y);
    // output: x: 5, y: 15
}

Data Types:

fn main() {
    let number: i32 = 42;  // Signed 32-bit integer
    let pi: f64 = 3.14;  // 64-bit floating-point number
    let is_true: bool = true;  // Boolean
    let letter: char = 'A';  // Character
    println!("Number: {}, Pi: {}, Is True: {}, Letter: {}", number, pi, is_true, letter);
    // output: Number: 42, Pi: 3.14, Is True: true
}

Control Flow:

fn main() {
    let number = 7;
    // if/ if else/ else
    if number < 5 {
        println!("Number is less than 5");
    } else if number == 5 {
        println!("Number is equal to 5");
    } else {
        println!("Number is greater than 5");
    }
    
    // Loop
    let mut counter = 0;
    loop {
        println!("Counter: {}", counter);
        counter += 1;
        if counter >= 5 {
            break;
        }
    }
    
    //
    // match @desc this is Unqiue to Rust.
    let day = 3;
    match day {
        1 => println!("Monday"),
        2 => println!("Tuesday"),
        3 => println!("Wednesday"),
        _ => println!("Other day"),
    }
}

Match:

fn main() {
    let number = 5;
    
    match number {
        1 => println!("Number is 1"),
        2 | 3 | 4 => println!("Number is 2, 3, or 4"),
        5..=10 => println!("Number is between 5 and 10 (inclusive)"),
        _ => println!("Number doesn't match any pattern"),
    }
}

Functions:

fn add_numbers(a: i32, b: i32) -> i32 {
    return a + b;
}

fn main() {
    let result = add_numbers(3, 4);
    println!("Result: {}", result);
    // output: Result: 7
}

Ownership and Borrowing:

fn main() {
    let s1 = String::from("hello");  // s1 owns the string "hello"
    let s2 = s1;  // s2 takes ownership of the string, s1 is invalidated
    println!("{}", s2);  // s2 can be used

    // output: hello  
    
    let s3 = String::from("world");
    let s4 = &s3;  // s4 borrows a reference to s3 and s3 is not invalidated
    println!("{}", s4);  // s4 can be used, but s3 is still valid
    // output: world
   
}

Conclusion

These are just a few basic concepts in Rust to get you started. Rust is a rich language with many more features and concepts to explore. Happy learning!