Skip to content

Commit 469af67

Browse files
committed
Auto merge of #6685 - king6cong:doc, r=alexcrichton
Add more about system library on whether to keep Cargo.lock None
2 parents fdb1426 + d1dae55 commit 469af67

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/doc/src/guide/cargo-toml-vs-cargo-lock.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ about them, here’s a summary:
88
* `Cargo.lock` contains exact information about your dependencies. It is
99
maintained by Cargo and should not be manually edited.
1010

11-
If you’re building a library that other packages will depend on, put
12-
`Cargo.lock` in your `.gitignore`. If you’re building an executable like a
13-
command-line tool or an application, check `Cargo.lock` into `git`. If you're
14-
curious about why that is, see ["Why do binaries have `Cargo.lock` in version
15-
control, but not libraries?" in the
11+
If you’re building a non-end product, such as a rust library that other rust packages will depend on, put
12+
`Cargo.lock` in your `.gitignore`. If you’re building an end product, which are executable
13+
like command-line tool or an application, or a system library with crate-type of `staticlib` or `cdylib`,
14+
check `Cargo.lock` into `git`. If you're curious about why that is, see
15+
["Why do binaries have `Cargo.lock` in version control, but not libraries?" in the
1616
FAQ](faq.html#why-do-binaries-have-cargolock-in-version-control-but-not-libraries).
1717

1818
Let’s dig in a little bit more.

0 commit comments

Comments
 (0)