Skip to Main Content

Department of Computer Science

Technical Services and Support

Running Rust Compiler on CS Linux Machines

Running Rust-Lang On CS Linux Machines

By Hanz Makmur – Feb 2020

Rust Programming Language, aka. Rust-Lang, a new practical and fast programming language, is locally available on CS Linux Machines. 

Before you can run  rustc, the  compiler for rust-lang, you need to set up your bash shell  by typing:

  1. Create a directory to store Cargo dependencies.
    mkdir -p $HOME/.cargo
  2. Copy/paste these lines in a terminal window:
    export RUSTUP_HOME="/common/system/rust/rustup"
    export PATH="/common/system/rust/cargo/bin:$PATH"
    export CARGO_HOME="$HOME/.cargo"

Note: You can make this permanent by adding these lines to  $HOME/.bashrc file

To learn more about Rust, please go to https://www.rust-lang.org/learn.