My Rust Cheatsheet

Rust is awesome!

Rust setup

Install Rust from: https://www.rust-lang.org/
Install VScode from: https://code.visualstudio.com/

VScode extensions:

VScode Commands

Command Description
Ctrl + ' open VScode terminal

Cargo Commands

Command Description
cargo help Get help on Cargo commands e.g. cargo help build
cargo version Give current version of installed Cargo
cargo new Create new project
cargo build Build the project
cargo run Build and run the project
cargo check Check project for syntax errors
cargo test Run the project with all the portions with the test attribute setup
cargo fetch Get all dependencies from the Cargo.toml file
cargo doc Create default automated documentation for the project
cargo clean Remove all build executable files from project

Naming Conventions

Type Description
File names lowercase_with_underscores.rs
Variable names lowercase_with_underscores
Function names lowercase_with_underscores
Constant names UPPERCASE_WITH_UNDERSCORES
Structs and Trait names CapitalLettersNoSeperator

Mission Accomplished

And there we have it, some very basic hints on setting up and using Rust.