I want to rename a published crate, I hesitated between:
-
publish a new version of the crate with the new name, update the old crate code as a wrapper (a package that contains as a dependency the new crate). PROs: don't break anything / CONs: since
Cargo.lock
lock library dependency version I should update both crates every time ... -
depreciate explicitly the old crate. PROs: force users to update explicitly the package name in their dependency / CONs: there is no (at the moment) depreciation mechanism in cargo (as it can exist in NPM npm-deprecate | npm Docs) the closest solution I found is to yank the package cargo yank - The Cargo Book which seems not allow to explicitly warn the user of the change ...
SO questions I read along my search: