Skip to content

Adding uv-install-wheel as dependency results in cargo build error on Windows #16836

@pavelzw

Description

@pavelzw
# Cargo.toml
[package]
name = "uv-bug"
version = "0.1.0"
edition = "2024"

[dependencies]
uv-install-wheel = "0.0.1"
// main.rs
fn main() {
    println!("Hello, world!");
}

building this on Windows results in the following error:

   Compiling uv-trampoline-builder v0.0.1
error: couldn't read `C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\uv-trampoline-builder-0.0.1\src\../../uv-trampoline/trampolines/uv-trampoline-x86_64-gui.exe`: The system cannot find the path specified. (os error 3)
  --> C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\uv-trampoline-builder-0.0.1\src\lib.rs:18:5
   |
18 |     include_bytes!("../../uv-trampoline/trampolines/uv-trampoline-x86_64-gui.exe");
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: couldn't read `C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\uv-trampoline-builder-0.0.1\src\../../uv-trampoline/trampolines/uv-trampoline-x86_64-console.exe`: The system cannot find the path specified. (os error 3)
  --> C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\uv-trampoline-builder-0.0.1\src\lib.rs:22:5
   |
22 |     include_bytes!("../../uv-trampoline/trampolines/uv-trampoline-x86_64-console.exe");
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: could not compile `uv-trampoline-builder` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

this is because the binaries referenced in

#[cfg(all(windows, target_arch = "x86_64"))]
const LAUNCHER_X86_64_CONSOLE: &[u8] =
include_bytes!("../../uv-trampoline/trampolines/uv-trampoline-x86_64-console.exe");

are not part of the uv-trampoline-builder crate

@zanieb

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedContribution especially encouragedreleasesRelated to building and distributing release artifacts of uv

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions