Re:Compiling Rust is NP-hard
by w-m on Thursday July 08, 2021 @06:41AM
(#27770292)
Presumably there’s another SAT solver in the realm of the Rust tool chain: cargo surely has one for dependency resolution. This is a big time sink in other package managers (looking at you, Anaconda). Does someone have an insight how solving is implemented in Cargo?
[ Parent
| on HN ]
Re:Compiling Rust is NP-hard
by littlestymaar on Thursday July 08, 2021 @07:06AM
(#27770434)
There is one[1] but Rust allows different major versions of the same package to exist in parallel, so dependency resolution is usually trivial unless someone in the dependency tree explicitly adds an upper limit of the acceptable version [2], which is pretty uncommon (I don't think I've ever met one in practice).
[1]: https://github.com/rust-lang/cargo/blob/master/src/cargo/cor...
[2]: https://doc.rust-lang.org/cargo/reference/specifying-depende...