Recent Posts


Rust’s Cargo and .lock Files in Package Managers


Frustrated by Magento? Then you’ll love Commerce Bug, the must have debugging extension for anyone using Magento. Whether you’re just starting out or you’re a seasoned pro, Commerce Bug will save you and your team hours everyday. Grab a copy and start working with Magento instead of against it.

Updated for Magento 2! No Frills Magento Layout is the only Magento front end book you'll ever need. Get your copy today!

I’m finding the various Rust guides well written — or perhaps just well written for me. This bit in the Cargo Guide (Rust’s package manager and build tool) on Cargo.lock files was particularly succinct.

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, […] like a command-line tool or an application, or a system library with crate-type of staticlib or cdylib, check Cargo.lock into git. If you’re curious about why that is, see “Why do binaries have Cargo.lock in version control, but not libraries?” in the FAQ.

I remember learning about package manager .lock files for composer and npm, and most of what was written about them was selling you on a particular use case.

This is why you must use .lock files_


Using a .lock file? Here’s 10 reasons you’re history’s greatest a monster

The Rust docs are great here because they lay out simple rules for a beginner to follow, but then back that rule up more in-depth documentation elsewhere.

Copyright © Alan Storm 1975 – 2023 All Rights Reserved

Originally Posted: 18th August 2020