Skip to content

An example of git dependencies in a local registry generated via cargo-local-registry

Notifications You must be signed in to change notification settings

jarhodes314/rust-lr-git-deps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust local registry with git dependencies

Requirements

A patched version of cargo local-registry is required, this can be installed via cargo install --git https://github.com/jarhodes314/cargo-local-registry --branch feature/null-checksums.

How to test the cargo changes

This is an example of a maximally simple Rust crate with a git dependency cached in a local registry. Using cargo 1.63.0, running cargo build --frozen will fail, but with the changes in rust-lang/cargo#11188, it will succeed, as cargo will not try and add a checksum field to the "example" dependency. Running cargo local-registry -s Cargo.lock registry --git (to update the local registry) should succeed.

To see the motivation behind omitting the checksum from the registry rather than calculating a fake one in cargo local-registry, modify the registry index for example to contain "cksum":"" instead of "cksum":null. Running cargo build with cargo 1.63.0 will add the checksum field into the lockfile. This will cause cargo local-registry -s Cargo.lock registry --git to fail. This is the primary reason why the change needs to be in cargo, rather than in cargo local-registry.

About

An example of git dependencies in a local registry generated via cargo-local-registry

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages