Installing Rust on Ubuntu 14.04

  • Last Created On Dec 09, 2024
  • 39
0 0

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.

Views: 39

Recent Articles

  • How to Install JAX with ROCm Acceleratio...
    848
  • Deploy a PyTorch Workspace on a Vultr Cl...
    506
  • Managing Backup Storage
    542
  • Automating FTP Backups in Windows Server
    516
  • Automating FTP Backups in Linux
    494

Popular Articles

  • Our General Terms & Conditions
    13614
  • Our Privacy Policy
    12994
  • Our Cookies Policy
    1487
  • How to Install JAX with ROCm Acceleratio...
    848
  • Our Terms of Use
    838