After a quick search, it seems the answer is no for the current version of Cargo, so I posted this question on IRLO.
Since I need to use cksumvfs—a feature not yet officially supported by rusqlite—I created a fork of rusqlite and tried to add the Git repository URL of that fork to the project’s dependencies. However, since rusqlite is a relatively large project, Cargo appears to fetch the entire history, which significantly slows down the first compilation. This is just a repository with a history of tens of megabytes in size—I can’t even imagine how slow and space-consuming it would be if the repository were hundreds of megabytes or even gigabytes in size. Therefore, using --depth 1 or fetching only the specific commit needed might be a better option.