I have a question about Cargo lock file

I didn't see the corresponding instructions in the book, but I found that some warehouses in GitHub uploaded cargo lock file, while others didn't. I want to know under what circumstances should we keep cargo lock file.

tauri uses cargo lock file to provide deterministic builds.

But I'm writing a library for developers to use. I hope developers can get the latest version instead of reading relevant configurations from lock file.

https://doc.rust-lang.org/stable/cargo/faq.html#why-do-binaries-have-cargolock-in-version-control-but-not-libraries

3 Likes

thanks