Rust, commonly known as Rust-Lang, is a system programming language that is developed by Mozilla and backed by LLVM. Rust is known for preventing program crashes, memory leaks, and data races before it is compiled into binary, thus creating a highly-productive and stable programming environment. More recently, Rust has released a stable version 1.0.0, which means that less code updates will be required for developers. This article will show you how to install Rust onto Ubuntu 14.04 x64.
System Update
To make sure that all of Rust’s dependencies are up-to-date, run the following commands.
apt-get update
apt-get dist-upgrade -y
apt-get install curl
Install Rust
Installing Rust is a simple process. Run the following command to launch their installation script.
curl -sSf https://static.rust-lang.org/rustup.sh | sh
When the script finishes, Rust will be installed.
Verifying Rust
To verify that Rust was successfully installed, run rustc -V
. You will see output similar to:
rustc 1.0.0 (a59de37e9 2015-05-13) (built 2015-05-14)
Using Rust
To use Rust, create a file called main.rs
and populate it with the following lines of code:
fn main() {
println!("You have successfully installed rust!");
}
Now run rustc main.rs
. You will see an executable file called main
in the same directory. Execute it by running ./main
. The text “You have successfully installed Rust!” will appear on your screen.
Want to contribute?
You could earn up to $300 by adding new articles
Suggest an update
Request an article