Cargo creates and organizes Rust projects, compiles and runs binaries, and manages dependencies through project manifests. Its workspace support groups related binary and library projects under one repository. section 2.2.2 section 3.1.1
A typical project workflow uses Cargo to:
- Create a workspace and member projects with cargo new, including binary and library packages. section 2.2.2
- Declare workspace membership, dependencies, and binary names in Cargo.toml. section 3.1.1
- Build and run one workspace member or a named binary with cargo run -p and cargo run --bin. section 2.2.2 section 3.1.1
Workspace for a server project
Create a scenario1 workspace containing tcpclient, tcpserver, http, and httpserver, then run the TCP server with cargo run -p tcpserver. A second workspace, ezytutors, contains tutor-nodb, whose basic-server binary runs with cargo run -p tutor-nodb --bin basic-server. section 2.2.2 section 3.1.1
Workspace structure shows how Cargo places multiple related Rust packages beneath a shared root. section 2.2.2




