Table of content

Package Manager

Package Manager is something that manages the libraries and projects of Rust. Packages are nothing but the libraries, modules, and headers which are required to run a Rust Program. In Rust the name of the Package Manager is Rust.

The different types of Cargo Commands are:

  • cargo build : This command builds the current project.
  • cargo check : This command analyzes the current project and reports errors. This command will not create any object file in the program folder.
  • cargo run : The command will build and execute the program

cargo clean : This command will remove the current directory.

  • cargo update : The command will update the dependencies which are located inside the Cargo.lock file.
  • cargo new : The command creates a new project.

Using Cargo we can also download the third-party libraries from the internet. Cargo can also be used to create our own library we have seen in our article-modules-in-rust.

Below are the ways to create different types of projects in Rust:

  • Creating a new binary project:
cargo new project_name --bin
  • Creating a new library project:
cargo new project_name --lib
  • Checking the version of the current Cargo.

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions