@@ -4,17 +4,27 @@ This document gives a high level overview of Cargo internals. You may
44find it useful if you want to contribute to Cargo or if you are
55interested in the inner workings of Cargo.
66
7+ The purpose of Cargo is to formalize a canonical Rust workflow, by automating
8+ the standard tasks associated with distributing software. Cargo simplifies
9+ structuring a new project, adding dependencies, writing and running unit tests,
10+ and more.
11+
712
813## Subcommands
914
10- Cargo is organized as a set of ` clap ` subcommands. All subcommands live in
15+ Cargo is a single binary composed of a set of [ ` clap ` ] [ ] subcommands. All subcommands live in
1116` src/bin/cargo/commands ` directory. ` src/bin/cargo/main.rs ` is the entry point.
1217
13- A typical subcommand, such as ` src/bin/cargo/commands/build.rs ` , parses command line
14- options, reads the configuration files, discovers the Cargo project in
15- the current directory and delegates the actual implementation to one
18+ Each subcommand, such as ` src/bin/cargo/commands/build.rs ` , has its own API
19+ interface, similarly to Git's, parsing command line options, reading the
20+ configuration files, discovering the Cargo project in the current directory and
21+ delegating the actual implementation to one
1622of the functions in ` src/cargo/ops/mod.rs ` . This short file is a good
1723place to find out about most of the things that Cargo can do.
24+ Subcommands are designed to pipe to one another, and custom subcommands make
25+ Cargo easy to extend and attach tools to.
26+
27+ [ `clap` ] : https://clap.rs/
1828
1929
2030## Important Data Structures
0 commit comments