This chapter covers
- Introduction to Cargo
- Managing Rust projects with Cargo
- Publishing Rust applications and libraries
- Following the Rust community’s best practices for managing and publishing projects
Rust’s package management tool is called Cargo, and it’s the interface to Rust’s compiler rustc, the crates.io registry, and many other Rust tools (which are covered in more detail in _ 3_). Strictly speaking, it’s possible to use Rust and rustc without using Cargo, but it’s not something I recommend.
When working with Rust, you’ll likely spend a lot of time using Cargo and tools that work with Cargo. It’s important to familiarize yourself with its use and best practices. In 3, I’ll provide recommendations and details on how to increase the usefulness of Cargo with community crates.
To demonstrate Cargo’s features, let’s walk through a tour of Cargo and its typical usage. I implore you to follow along (ideally by running the commands as demonstrated below). In doing so, you may discover new features even if you’re already familiar with Cargo and its usage.
To start, run cargo help to list available commands: