Skip to content

Commit

Permalink
docs(resolver): Move Constraints context under new Constraints header
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Oct 9, 2024
1 parent f147d52 commit 16dbce1
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/doc/src/reference/resolver.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ use based on the version requirements specified in each package. This process
is called "dependency resolution" and is performed by the "resolver". The
result of the resolution is stored in the `Cargo.lock` file which "locks" the
dependencies to specific versions, and keeps them fixed over time.
The [`cargo tree`] command can be used to visualize the result of the
resolver.

[dependency specifications]: specifying-dependencies.md
[dependency specification]: specifying-dependencies.md
[`cargo tree`]: ../commands/cargo-tree.md

## Constraints and Heuristics

In many cases there is no single "best" dependency resolution.
The resolver operates under various constraints and heuristics to find a generally applicable resolution.
Expand Down Expand Up @@ -63,15 +71,6 @@ Key steps:
Cargo may decide that it should prefer a specific version,
falling back to the next version when backtracking.

The [`cargo tree`] command can be used to visualize the result of the
resolver.

[dependency specifications]: specifying-dependencies.md
[dependency specification]: specifying-dependencies.md
[`cargo tree`]: ../commands/cargo-tree.md

## Constraints and Heuristics

### SemVer compatibility

Cargo uses [SemVer] for specifying version numbers. This establishes a common
Expand Down

0 comments on commit 16dbce1

Please sign in to comment.