Building an extremely fast Python package manager, in Rust
summary
uv claims orders-of-magnitude speedups while serving over ten million downloads per month and implements a full resolver and installer in Rust that actually works at scale. It uses a pubgrub SAT solver with domain optimizations, a compact u64 version encoding that yields 3–4x faster comparisons, async Tokio single-threaded IO and careful thread orchestration, and a global cache of unpacked archives served via reflinks and hardlinks to enable zero-copy tricks and massively cheaper installs.
AI-written summary · about
chapters (17)
- 0:00UV and Astral intro
- 1:49Building a new package manager
- 5:00Python vs Rust packaging
- 7:44Multiversion support challenges
- 8:06Platform dependency markers
- 11:14Native code challenges
- 13:40Python ecosystem history
- 14:44Rust powers UV success
- 15:06Safety in Rust
- 15:48Rust portability
- 17:54Rust performance advantage
- 18:37Optimizing version parsing
- 23:16Async IO and runtime
- 25:02SAT solvers for deps
- 27:11UV global cache design
- 29:15Rust’s impact on UV
- 30:17Conclusion and future
related talks
21mShipping uv's binaries to millions of machines
39mPeeking under the hood of uv run
36mPumping up Python modules using Rust
28mBeyond the Benchmark: Why the “Best” Python Dependency Manager Might Not Be Best for You
01h 02mRuff: An Extremely Fast Python Linter and Code Formatter, Written in Rust
31mPumping up Python modules using Rust
29mBridging the worlds: pixi reimplements pip and conda in Rust
46mA journey to performance: using Rust in Mercurial
