Skip to content

Commit 6866f13

Browse files
committed
Auto merge of #31159 - dirk:dirk/clarify-cargo-lock, r=steveklabnik
Also remove a "finally" in the section about building for release to make it feel a bit friendlier.
2 parents ba356ff + a469cef commit 6866f13

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/doc/book/getting-started.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -511,15 +511,17 @@ programming languages. For complex projects composed of multiple crates, it’s
511511
much easier to let Cargo coordinate the build. Using Cargo, you can run `cargo
512512
build`, and it should work the right way.
513513

514-
## Building for Release
514+
### Building for Release
515515

516-
When your project is finally ready for release, you can use `cargo build
516+
When your project is ready for release, you can use `cargo build
517517
--release` to compile your project with optimizations. These optimizations make
518518
your Rust code run faster, but turning them on makes your program take longer
519519
to compile. This is why there are two different profiles, one for development,
520520
and one for building the final program you’ll give to a user.
521521

522-
Running this command also causes Cargo to create a new file called
522+
### What Is That `Cargo.lock`?
523+
524+
Running `cargo build` also causes Cargo to create a new file called
523525
*Cargo.lock*, which looks like this:
524526

525527
```toml

0 commit comments

Comments
 (0)