Is it good practice to release a new version of a crate, not because there is anything wrong or broken, but because a significant period of time has passed and there is a new version of a dependent crate, or there is a new edition of Rust ( in other words only the toml file is changing )? Or is it better not to do this?
If the new dependency version is āsemver-compatibleā with the old one (e.g., an upgrade from 1.2.3 to 1.3.0, or from 0.6.8 to 0.6.9), then you don't need to change your manifest or publish a new version of your crate. Cargo will use the latest version of the dependency by default when new users install your crate from crates.io. Existing users of your library crate can upgrade its dependencies in their own Cargo.lock
files by running cargo update
, without any changes to your crate.
If the new dependency version is āsemver-incompatibleā (e.g., an upgrade from 1.2.3 to 2.0.0, or from 0.6.8 to 0.7.0), then yes, you should publish a new version of your crate if you want it to be usable with the latest versions of its dependencies.
There's not much benefit to publishing a new release just to change the Rust edition field. The Rust toolchain will always support all previous editions, and a crate written in one edition can link to crates written in other editions, so users arenāt affected by your crate remaining on an old edition.
Rust's ecosystem is young enough that there still seems to be a social benefit to occasionally releasing trivial updates. That is, I occasionally see comments like "no updates in 6 months, must be a dead project."
Thank you, I didn't realise this. That makes a lot of sense.
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.