Rust
- Rust is a multi-paradigm, high-level, general-purpose programming language.
- Rust emphasizes performance, type safety, and concurrency.
- Rust enforces memory safety — that is, that all references point to valid memory without requiring the use of a garbage collector or reference counting present in other memory-safe languages.
- To simultaneously enforce memory safety and prevent concurrent data races, Rust’s “borrow checker” tracks the object lifetime of all references in a program during compilation.
- Rust is popular for systems programming but also offers high-level features including some functional programming constructs.
- Designed by: Graydon Hoare
Wikipedia: https://en.wikipedia.org/wiki/Rust_(programming_language)
Prerequisites
Before we begin to install Rust, we need to update our system or make sure up-to-date latest packages
Debian-based system:
| |
Fedora-based system:
| |
Install using RustUp Script
Open a terminal and enter the following command:
| |
The command downloads a script and starts the installation of the rustup tool, which installs the latest stable version of Rust.
Now source the Rust Environment Variable
| |
Verification
To check whether you have Rust installed correctly, open a shell and enter this rust version command:
| |
Updating and Uninstalling
From your shell, run the following command:
| |
To uninstall Rust and rustup, run the following uninstall script from your shell:
| |
Hello, World!
| |
Official Docs: https://doc.rust-lang.org/book/ch01-02-hello-world.html