Using Rust

Rust is an open-source, multi-paradigm, general-purpose programming language designed for performance and safety.

Using Rust on CARC systems

Begin by logging in. You can find instructions for this in the Getting Started with Discovery or Getting Started with Endeavour user guides.

Instead of using a software module, it is better to use the rustup tool to install Rust, rustc, and cargo in one of your CARC directories. By default, this will be your home directory. Run the following command:

curl --proto '=https' --tlsv1.2 -sSf | sh

Follow the prompts. The installation will take a few minutes to complete.

The rustup tool can also be used to update Rust and related tools and switch between different versions.

Once installed, you can then compile and run Rust programs. You can compile Rust programs with the rustc compiler on a login node, but you will need to submit a job in order to run the programs. See the Running Jobs user guide for more information.

Additional resources

If you have questions about or need help with Rust, please submit a help ticket and we will assist you.



Rust by Example

Web books:

The Rust Book
The rustup Book
The rustc Book
The Cargo Book

Back to top