Skip to content

Network based dependency resolution #5597

@ishitatsuyuki

Description

@ishitatsuyuki

This is a proposal to move to a API call based dependency resolution, rather than the Git based index clone. This is similar to what NPM uses.

Mainly, git based index clone has scalability issues:

  • The initial clone is a burden. Even after squashing it still takes a few megabytes, which is poor UX on throttled mobile network. A NPM-like solution consumes much acceptable traffic.
  • It doesn't scale. If we had as much packages as NPM, the index will be too large to download.

Then, here are some random notes:

  • Resolution caching should be done at HTTP level. This approach is good because it is also honoured by the CDN (if we eventually use one).
  • When working offline we can rely on crates we cached locally to resolve dependencies.
  • To replace the functionality of the crates.io-index repository, we can have daily database dumps, and offer an API and/or UI to display the latest updated crates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions