https://linen.dev logo
.gitignore Cargo.lock?
# help
s
Rust Book says: > If you’re building a non-end product, such as a rust library that other rust packages will depend on, put Cargo.lock in your .gitignore. If you’re building an end product, which are executable like command-line tool or an application, or a system library with crate-type of staticlib or cdylib, check Cargo.lock into git. Technically, shuttle service crate is a library, but I'm not sure if the paragraph above applies. Should we or should we not put
Cargo.lock
into
.gitignore
for shuttle services?
s
Personally I have to real opinion on this. When shuttle builds a crate we add the
cdylib
type to the
Cargo.toml
if it is not already present. So according to the book, you'll want to check
Cargo.lock
into git. This would also make sense if you want to ensure the remote build is the exact same local builds (
cargo shuttle run
) since it will avoid unexpected surprises arising from different versions being used.