Commit Graph

3 Commits

Author SHA1 Message Date
Ivan Petkov
a0d1df4631
Fix alt-registry example (#343)
* crates.io uses the sparse registry by default, and trying to
  explicitly register a sparse registry for it results in errors
* Also set nixConfig to include binary cache
2023-06-18 23:16:45 +00:00
James Baker
75f7d715f8
Natively support sparse registries (#324)
With Cargo 1.68.0, sparse registries were made stable. With sparse
registries, index metadata is stored in an HTTP api rather than in
a git repository.

As relevant to Crane, the relevant changes are mostly that registries
do not always start with `registry+` and mostly start with `registry+`
or `sparse+` depending on whether the registry is sparse or not.

This PR adjusts the core of Crane to differentiate between `registry`
and `sparse`, and adds a new sparse registry factory to make things
easy.

---------

Co-authored-by: Ivan Petkov <ivanppetkov@gmail.com>
2023-06-13 02:03:18 +00:00
Ivan Petkov
4adc828133 Add example for using an alternative cargo registry 2022-01-30 23:58:56 +00:00