How to find version of Cargo in Rust


What is Cargo?

    Cargo is the Package Manager as well as the Build System for the Rust Programming Language. It comes built-in when you install Rust using rustup.


How to know Cargo version?

  1. Open Terminal/Command Prompt/PowerShell.
  2. Type the command,
    cargo --version

    You should see the version details as follows,

    cargo 1.71.0 (cfd3bbd8f 2023-06-08)

    Note: If you see "command not found: cargo" then make sure that you have rust installed and available in the PATH environment variable.

Rust Cargo Version Example

On the Mac you can make use of the whereis or which command to locate cargo.

Example:

% whereis cargo
cargo: /Users/c2ctech/.cargo/bin/cargo

% which cargo
/Users/c2ctech/.cargo/bin/cargo
-

Facing issues? Have Questions? Post them here! I am happy to answer!


Author: Rakesh
Author Info:

Rakesh is a seasoned developer with over 10 years of experience in web and app development, and a deep knowledge of operating systems. Author of insightful How-To articles for Code2care.

Follow him on: X

Copyright © Code2care 2023 | Privacy Policy | About Us | Contact Us | Sitemap