This page provides an overview of the development infrastructure supporting the uv project, including the Cargo workspace structure, continuous integration pipeline, testing framework, and release automation. This infrastructure enables multi-platform builds, comprehensive testing, and coordinated releases across multiple distribution channels.
For detailed information about specific components:
The uv project is organized as a Cargo workspace containing multiple interdependent crates. The workspace configuration defines shared dependencies, compilation profiles, and project metadata used across all crates.
Sources: Cargo.toml1-339
| File | Purpose | Key Settings |
|---|---|---|
Cargo.toml | Workspace definition, shared dependencies | 60+ crate members, shared dependency versions, lint rules |
dist-workspace.toml | Release configuration for cargo-dist | Target platforms, installers, CI backends |
rust-toolchain.toml | Rust version pinning | Ensures consistent compiler version |
.cargo/config.toml | Cargo configuration | Build settings, feature flags |
Sources: Cargo.toml1-10 dist-workspace.toml1-94
The workspace defines specialized build profiles for different use cases:
release: Production builds with LTO and stripping enabled (Cargo.toml267-270)profiling: Benchmarking builds with debug info but no LTO (Cargo.toml307-311)fast-build: Development builds with minimal optimization (Cargo.toml315-319)no-debug: Fast builds without debug symbols (Cargo.toml323-326)minimal-size: Size-optimized builds for uv-build (Cargo.toml328-334)Sources: Cargo.toml267-334
The CI system uses GitHub Actions to validate code changes across multiple platforms, run comprehensive tests, and enforce code quality standards.
Sources: .github/workflows/ci.yml1-1197
The CI pipeline implements intelligent change detection to skip unnecessary work for documentation-only changes:
This optimization saves significant CI time by avoiding expensive multi-platform test runs when only documentation is modified.
Sources: .github/workflows/ci.yml24-81
Tests are executed using cargo-nextest with platform-specific feature flags:
| Platform | Runner | Feature Flags | Profile |
|---|---|---|---|
| Linux | depot-ubuntu-22.04-16 | python-patch,native-auth,secret-service | ci-linux |
| macOS | depot-macos-14 | python,python-managed,pypi,git,git-lfs,performance,crates-io,native-auth,apple-native | ci-macos |
| Windows | depot-windows-2022-16 | python,pypi,python-managed,native-auth,windows-native | ci-windows |
Sources: .github/workflows/ci.yml243-393
The CI pipeline validates uv against real-world projects to catch regressions:
Sources: .github/workflows/ci.yml838-903
The release process is orchestrated by cargo-dist, which coordinates building, packaging, and publishing across multiple platforms and distribution channels.
Sources: .github/workflows/release.yml1-302 dist-workspace.toml1-94
Binary builds target 18+ platforms using a combination of native compilation and cross-compilation:
Sources: .github/workflows/build-binaries.yml1-899 dist-workspace.toml21-40
The release process generates multiple artifact types for different installation methods:
| Artifact Type | Format | Distribution Channel | Workflow |
|---|---|---|---|
| Python Wheels | .whl | PyPI | publish-pypi.yml |
| Source Distribution | .tar.gz | PyPI | build-binaries.yml |
| Native Binaries | .tar.gz, .zip | GitHub Releases | build-binaries.yml |
| Docker Images | container | GHCR, Docker Hub | build-docker.yml |
| Rust Crates | published | crates.io | publish-crates.yml |
| Install Scripts | .sh, .ps1 | GitHub Releases | release.yml |
Sources: .github/workflows/release.yml1-302 .github/workflows/build-binaries.yml46-98
The Docker build workflow creates 30+ image variants combining base images with different Python versions:
Each variant is built for linux/amd64 and linux/arm64 architectures using Depot for efficient multi-platform builds.
Sources: .github/workflows/build-docker.yml163-309
The project uses multiple testing approaches to ensure correctness across different scenarios and platforms.
Most integration tests use insta for snapshot testing, allowing easy review of output changes:
Snapshots are automatically updated during test runs and reviewed as part of the PR process.
Sources: scripts/scenarios/templates/install.mustache47-65
The project uses packse to generate deterministic test scenarios for dependency resolution:
The generation process:
packse-scenarios/rustfmtcargo insta testSources: scripts/scenarios/generate.py1-362
Sources: .github/workflows/ci.yml243-393 scripts/scenarios/generate.py183-285
Key development commands used in CI and locally:
The repository includes automated workflows for maintenance tasks:
| Workflow | Schedule | Purpose | File |
|---|---|---|---|
| Sync Python Releases | Daily | Update Python download metadata | sync-python-releases.yml |
| Zizmor | On PR/Push | Security analysis of workflows | zizmor.yml |
Sources: .github/workflows/sync-python-releases.yml1-53 .github/workflows/zizmor.yml1-25
The sync-python-releases workflow automatically updates Python installation metadata:
This ensures uv always has access to the latest Python releases without manual intervention.
Sources: .github/workflows/sync-python-releases.yml27-52
For manual releases, the process follows these steps:
pyproject.toml and Cargo.toml0.5.0)The release is controlled by dist-workspace.toml configuration and orchestrated by the release.yml workflow.
Sources: .github/workflows/release.yml1-302 dist-workspace.toml1-94
Refresh this wiki