Rust (programming language)

Rust is a programming language designed for systems, which are "software designed to provide a platform for other software". It is or was used to write operating system and web browser components, services such as OpenDNS and Tor, and game engines. It was made by former Mozilla engineer Graydon Hoare.
Software developer Graydon Hoare created Rust as a personal project while working at Mozilla Research in 2006. Mozilla officially sponsored the project in 2009. Since the first stable release in May 2015, Rust has been adopted by companies including Amazon, Discord, Dropbox, Facebook (Meta), Google (Alphabet), and Microsoft.
Examples.
Here is a hello world program in Rust.
// Define entry point.
fn main() {
 // Writes to the output.
 println!("Hello world!");
Here is an example of how to declare a variable, change its value and print its value to the console.
// Define entry point.
fn main() {
 // Assign the value 5 to the variable called x.
 // In Rust, by default, all variables are immutable, which means that their values can't be changed.
 // To make a variable mutable, put the `mut` keyword after the `let` keyword.
 let mut x = 5;
 x = 2;
 // Writes the value of x to the output. 
 println!("{}", x);
Here is an example of using `if`, `elif` and `else` conditionals in Rust.
// Define entry point.
fn main() {
 let x = 5;
 // In Rust, conditions don't have to be in parantheses.
 if x == 5 {
 println!("It's five!");
 } elif x &gt; 5 {
 println!("It's larger than five!");
 } else {
 println!("It isn't equal to five, nor is bigger than five.");
Here is are examples of loops in Rust.
// Define entry point.
fn main() {
 // Here is a `while` loop.
 while counter &lt; 5 {
 // some code
 counter += 1;
 // Here is a `for` loop.
 for i in 1..10 {
 println!("{}", i); // Prints numbers from 1 up to 9.
 // Here is a `loop` loop.
 loop {
 // some code
 if condition {
 break
Here is an example of functions in Rust.
// Define entry point.
fn main() {
 // To specify a data type of a variable, write a colon after the variable name and choose a data type.
 // u8 is a unsigned 8-bit integer, ranging from 0 to 255.
 let x: u8 = 5;
 let y: u8 = 2;
 // Writes the sum of the variables x and y to the console..
 println!("{}", sum(x, y));
In Rust, functions are declared with the `fn` keyword. Parameters are put into the parantheses.
The return type is put after the parantheses and hyphen and right angle-bracket.
If the expression is the last in the function body, it doesn't require a `return` keyword and a semicolon.
fn sum(x: i32, y: i32) -&gt; i32 {
 x + y