cargo::core::resolver

Module dep_cache

source
Expand description

There are 2 sources of facts for the resolver:

  • The Registry tells us for a Dependency what versions are available to fulfil it.
  • The Summary tells us for a version (and features) what dependencies need to be fulfilled for it to be activated.

These constitute immutable facts, the soled ground truth that all other inference depends on. Theoretically this could all be enumerated ahead of time, but we want to be lazy and only look up things we need to. The compromise is to cache the results as they are computed.

This module impl that cache in all the gory details

Structsยง

Enumsยง

Functionsยง

  • build_requirements ๐Ÿ”’
    Takes requested features for a single package from the input ResolveOpts and recurses to find all requested features, dependencies and requested dependency features in a Requirements object, returning it to the resolver.
  • Returns the features we ended up using and all dependencies and the features we want from each of them.