Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md
banner

Resolvo: Fast package resolver written in Rust

License crates.io Build Status Project Chat Docs

Resolvo implements a fast package resolution algorithm based on CDCL SAT solving.

Projects using resolvo

  • rip: An async package resolver and installer for Python PyPI packages
  • rattler: Conda package resolver and installer (non-async)
  • resolvo-rpm: Experimental RPM resolver for Fedora / RedHat / OpenSUSE ... RPM packages
  • ... add yours!

Features

If resolvo is unable to find a solution it outputs a human-readable error message:

The following packages are incompatible
├─ bluesky-widgets >=0, <100 can be installed with any of the following options:
│  └─ bluesky-widgets 42 would require
│     └─ suitcase-utils >=0, <54, which can be installed with any of the following options:
│        └─ suitcase-utils 53
└─ suitcase-utils >=54, <100 cannot be installed because there are no viable options:
   └─ suitcase-utils 54, which conflicts with the versions reported above.

Resolvo provides a generic interface which allows integrating the solver with a variety of package managers. For instance resolvo is used in rattler and pixi to solve packages from the conda ecosystem.

Originally resolvo started out as a port/fork of libsolv but it has since then diverged substantially. However, the same CDCL algorithm based on MiniSats An Extensible SAT-solver is still used underneath. Major differences compared to libsolv are:

  • Resolvo does not come with built-in support for several packaging ecosystems but instead provides a generic interface to allow it to be used in different scenarios.
  • Resolvo has support for incremental/lazy solving. This allows users to quickly find solutions in ecosystems where retrieving package metadata is expensive.
  • Resolvo is considerably faster than libsolv in large complex cases.
  • Resolvo can easily be used in multithreaded environments.
  • Resolvo provides human-readable error messages out-of-the-box.
  • Resolvo optionally provides an async interface to allow concurrent metadata fetching.
  • However, Libsolv is more extensive and supports more complex queries.

C++ bindings

Resolvo ships C++ bindings (see cpp/). A runnable example that solves sudoku puzzles with the solver lives in cpp/examples. With Pixi you can build and run it from the repository root:

pixi run cpp-example-sudoku

Pass your own puzzle as an 81-character string (. or 0 for empty cells):

pixi run cpp-example-sudoku "53..7....6..195....98....6.8...6...34..8.3..17...2...6.6....28....419..5....8..79"

See the example README for more details.

Contributing 😍

We would love to have you contribute! See the CONTRIBUTION.md for more info. For questions, requests or a casual chat, we are very active on our discord server. You can join our discord server via this link.

关于 About

Fast package resolver written in Rust (CDCL based SAT solving)

语言 Languages

Rust74.5%
Jupyter Notebook17.6%
C++6.5%
CMake1.4%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
81
Total Commits
峰值: 9次/周
Less
More

核心贡献者 Contributors