diff --git a/Rust.gitignore b/Rust.gitignore index ff47c2d77d..3ca1767367 100644 --- a/Rust.gitignore +++ b/Rust.gitignore @@ -3,8 +3,10 @@ debug/ target/ -# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries -# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html +# If this is a library or crate (that other Rust projects will depend upon), keep Cargo.lock in your .gitignore. +# If you’re building a binary or system library with crate-type of staticlib or cdylib, remove Cargo.lock from your .gitignore. +# If you're curious about why that is, see "Why do binaries have Cargo.lock in version control, but not libraries?" in the FAQ. +# https://doc.rust-lang.org/cargo/faq.html#why-do-binaries-have-cargolock-in-version-control-but-not-libraries Cargo.lock # These are backup files generated by rustfmt