Abstract


Obtain Rust


  • Script below includes the Rust Compiler rustc, rustup the Rust tool chain installer and Cargo
# Starts the installation of the `rustup` tool - managing the version of Rust, which installs the latest stable version of Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
 
rustc --version # Verify rust is installed properly
Cargo Cheatsheet
cargo check # Make sure the codes can be compiled - fast than actually compiling
 
cargo build # Compilation
cargo build --release # Compilation + optimisation
 
cargo run # Compilation + Run
cargo run --release # cargo run + optimisation