Skip to content

Commit d9d902e

Browse files
committed
Rollup merge of #30836 - Luke-Nukem:master, r=steveklabnik
Ref issue [30825](#30825) This commit should suffice to add a concise introduction to the concept of crates. My only worry, is that it is maybe too concise; but, the book seems to be written with the understanding that the new Rust user is coming from another language, and so will understand what a Library or Code Package is.
2 parents 56cae9f + 52786de commit d9d902e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/doc/book/crates-and-modules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
When a project starts getting large, it’s considered good software
44
engineering practice to split it up into a bunch of smaller pieces, and then
5-
fit them together. It’s also important to have a well-defined interface, so
5+
fit them together. It is also important to have a well-defined interface, so
66
that some of your functionality is private, and some is public. To facilitate
77
these kinds of things, Rust has a module system.
88

src/doc/book/getting-started.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -505,9 +505,11 @@ Cargo checks to see if any of your project’s files have been modified, and onl
505505
rebuilds your project if they’ve changed since the last time you built it.
506506

507507
With simple projects, Cargo doesn't bring a whole lot over just using `rustc`,
508-
but it will become useful in future. With complex projects composed of multiple
509-
crates, it’s much easier to let Cargo coordinate the build. With Cargo, you can
510-
run `cargo build`, and it should work the right way.
508+
but it will become useful in future. This is especially true when you start
509+
using crates; these are synonymous with a ‘library’ or ‘package’ in other
510+
programming languages. For complex projects composed of multiple crates, it’s
511+
much easier to let Cargo coordinate the build. Using Cargo, you can run `cargo
512+
build`, and it should work the right way.
511513

512514
## Building for Release
513515

0 commit comments

Comments
 (0)