Rust/en
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.
Module¶
The Rust compiler is available as a module.
Installing a crate¶
A package written in Rust is called a crate.
From Crates.io¶
- Load the required modules.
- Build and install the crate locally.
Note
This must be done from a login node.
- Test the binary.
Tip
You can also add .cargo/bin to your $PATH with: export PATH="$HOME/.cargo/bin:$PATH".
From a Git repository¶
- Load the required modules.
- Build and install the crate locally.
Note
This must be done from a login node.
- Test the binary.
Tip
You can also add .cargo/bin to your $PATH with: export PATH="$HOME/.cargo/bin:$PATH".
Using the Rust nightly compiler¶
Since some optimization features are not yet stable, they are not part of the stable release, but nonetheless some crates make use of them. If you require the Rust nightly compiler, you can install it locally.
- Install the compiler as a local module.
- Load the local module.
Clean up cache¶
Cargo cache and registry can eat up a lot of space. You can reclaim space by removing the registry:
```bash rm -r ~/.cargo/registry