How uv got so fast
- uv installs Python packages 10x faster than pip due to design decisions beyond just being written in Rust.
- Key standards like PEP 518 (pyproject.toml), PEP 517, PEP 621, and PEP 658 enabled static metadata parsing without executing untrusted code.
- uv drops legacy support: no .egg files, no pip.conf, no default bytecode compilation, requires virtual environments, stricter spec enforcement, ignores upper Python bounds, first-index wins.
- Non-Rust optimizations include HTTP range requests for metadata, parallel downloads, global cache with hardlinks, Python-free resolution, and PubGrub resolver.
- Rust-specific advantages: zero-copy deserialization, lock-free data structures, no interpreter startup, compact version representation.
- Lesson: Speed comes from modern standards, dropping legacy features, and fresh assumptions rather than language alone.
Hacker News Discussion
- Users praise uv's speed and discuss its impact on Python workflows, with many switching from pip.
- Debate on Rust's role: some credit architectural choices over language, others highlight zero-copy and concurrency benefits.
- Questions about compatibility gaps like missing pip.conf and .egg support, but most see them as acceptable trade-offs.
- Comparisons to Cargo and npm emphasize Python's late adoption of static metadata standards.
- Interest in PubGrub resolver and potential for pip to adopt similar optimizations without Rust.