🖥️cargo

➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the cargo command with important options and switches using examples.

▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁

#   ██████╗ █████╗ ██████╗  ██████╗  ██████╗ 
#  ██╔════╝██╔══██╗██╔══██╗██╔════╝ ██╔═══██╗
#  ██║     ███████║██████╔╝██║  ███╗██║   ██║
#  ██║     ██╔══██║██╔══██╗██║   ██║██║   ██║
#  ╚██████╗██║  ██║██║  ██║╚██████╔╝╚██████╔╝
#   ╚═════╝╚═╝  ╚═╝╚═╝  ╚═╝ ╚═════╝  ╚═════╝ 

# Cargo is the Rust package manager
# Cargo downloads your Rust project's dependencies,
# compiles your project, makes packages, and upload them to crates.io

# To start a new project 
cargo new hello_world --bin     # program
cargo new hello_world --lib     # library

# Build a project
cargo build

# Build a project with optimizations turned on
cargo build --release

# Updates dependencies in Cargo.lock
cargo update            # update all
cargo update -p rand    # updates just “rand”

# run the project tests (from src/ and tests/)
cargo test

# search for a package
cargo search
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░