Open-Source Wikis

/

uv

/

Crates

/

uv-trampoline

astral-sh/uv

uv-trampoline

crates/uv-trampoline/ is the source code of the Windows trampoline binaries that uv embeds. It is not part of the regular workspace — it's nightly-only, no_std, and built separately by scripts/build-trampolines.sh. The compiled binaries are then committed under crates/uv-trampoline-builder/src/bin/ and include_bytes!-loaded at runtime.

The Cargo.toml (workspace = false) excludes this crate from the main workspace, which is why cargo build from the repo root produces uv without compiling it.

Why a separate, nightly-only crate

The trampolines need to be tiny and depend on nothing — including the standard library — because they ship in every venv. Achieving that requires no_std, custom panic handlers, and a manual entry point, all of which only work cleanly on Rust nightly.

Layout

crates/uv-trampoline/
├── Cargo.toml         # workspace = false, no_std setup
├── src/
│   ├── main.rs        # The actual launcher
│   ├── bounce.rs      # Locating Python + spawning
│   └── ...
└── trampolines/       # Build artifacts

See also

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

uv-trampoline – uv wiki | Factory