diff --git a/Cargo.lock b/Cargo.lock index 1a018d4efce13..46c82a621057c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4710,7 +4710,6 @@ dependencies = [ "fs-err", "itertools 0.13.0", "markdown", - "mimalloc", "owo-colors", "pep508_rs", "poloto", @@ -4722,7 +4721,6 @@ dependencies = [ "serde_json", "tagu", "textwrap", - "tikv-jemallocator", "tokio", "tracing", "tracing-durations-export", @@ -4733,6 +4731,7 @@ dependencies = [ "uv-installer", "uv-macros", "uv-options-metadata", + "uv-production-memory-allocator", "uv-python", "uv-settings", "uv-workspace", diff --git a/Cargo.toml b/Cargo.toml index 339c7c5b3b021..fcb017028d39e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,6 +4,10 @@ exclude = [ "scripts", # Needs nightly "crates/uv-trampoline", + # Only used to pull in features, allocators, etc. — we specifically don't want them + # to be part of a workspace-wide cargo check, cargo clippy, etc. + "crates/uv-production-memory-allocator", + "crates/uv-production-flate2-backend", ] resolver = "2" @@ -56,8 +60,6 @@ uv-version = { path = "crates/uv-version" } uv-virtualenv = { path = "crates/uv-virtualenv" } uv-warnings = { path = "crates/uv-warnings" } uv-workspace = { path = "crates/uv-workspace" } -uv-production-memory-allocator = { path = "crates/uv-production-memory-allocator" } -uv-production-flate2-backend = { path = "crates/uv-production-flate2-backend" } anstream = { version = "0.6.13" } anyhow = { version = "1.0.80" } @@ -169,7 +171,7 @@ xz2 = { version = "0.1.7" } zip = { version = "0.6.6", default-features = false, features = ["deflate"] } [workspace.metadata.cargo-shear] -ignored = ["flate2", "xz2", "uv-production-memory-allocator", "uv-production-flate2-backend"] +ignored = ["flate2", "xz2"] [patch.crates-io] # For pyproject-toml diff --git a/crates/uv-dev/Cargo.toml b/crates/uv-dev/Cargo.toml index d7cef9f7823cb..4b6515555dd08 100644 --- a/crates/uv-dev/Cargo.toml +++ b/crates/uv-dev/Cargo.toml @@ -52,12 +52,7 @@ tracing = { workspace = true } tracing-durations-export = { workspace = true, features = ["plot"] } tracing-subscriber = { workspace = true } walkdir = { workspace = true } - -[target.'cfg(target_os = "windows")'.dependencies] -mimalloc = { version = "0.1.39" } - -[target.'cfg(all(not(target_os = "windows"), not(target_os = "openbsd"), any(target_arch = "x86_64", target_arch = "aarch64", target_arch = "powerpc64")))'.dependencies] -tikv-jemallocator = { version = "0.6.0" } +uv-production-memory-allocator = { path = "../uv-production-memory-allocator", optional = true } [[bin]] name = "uv-dev" @@ -68,4 +63,8 @@ required-features = ["dev"] default = [] # Actually build the dev CLI. dev = [] +production = ["dep:uv-production-memory-allocator"] render = ["poloto", "resvg", "tagu"] + +[package.metadata.cargo-shear] +ignored = ["flate2", "uv-production-flate2-backend"] diff --git a/crates/uv-production-flate2-backend/Cargo.toml b/crates/uv-production-flate2-backend/Cargo.toml index a094763c6183b..57584c2e709c7 100644 --- a/crates/uv-production-flate2-backend/Cargo.toml +++ b/crates/uv-production-flate2-backend/Cargo.toml @@ -1,19 +1,10 @@ [package] name = "uv-production-flate2-backend" version = "0.1.0" -edition.workspace = true -rust-version.workspace = true -homepage.workspace = true -documentation.workspace = true -repository.workspace = true -authors.workspace = true -license.workspace = true +publish = false [target.'cfg(not(target_arch = "s390x"))'.dependencies] flate2 = { version = "1.0.28", default-features = false, features = ["zlib-ng"] } [target.'cfg(target_arch = "s390x")'.dependencies] flate2 = { version = "1.0.28", default-features = false, features = ["rust_backend"] } - -[lints] -workspace = true diff --git a/crates/uv-production-memory-allocator/Cargo.toml b/crates/uv-production-memory-allocator/Cargo.toml index 6371911661be1..631f274eb2e5a 100644 --- a/crates/uv-production-memory-allocator/Cargo.toml +++ b/crates/uv-production-memory-allocator/Cargo.toml @@ -1,16 +1,7 @@ [package] name = "uv-production-memory-allocator" version = "0.1.0" -edition.workspace = true -rust-version.workspace = true -homepage.workspace = true -documentation.workspace = true -repository.workspace = true -authors.workspace = true -license.workspace = true - -[lints] -workspace = true +publish = false [dependencies] diff --git a/crates/uv/Cargo.toml b/crates/uv/Cargo.toml index a9c0722ed1d4d..cf5bcd7259859 100644 --- a/crates/uv/Cargo.toml +++ b/crates/uv/Cargo.toml @@ -45,8 +45,8 @@ uv-types = { workspace = true } uv-virtualenv = { workspace = true } uv-warnings = { workspace = true } uv-workspace = { workspace = true } -uv-production-memory-allocator = { workspace = true, optional = true } -uv-production-flate2-backend = { workspace = true, optional = true } +uv-production-memory-allocator = { path = "../uv-production-memory-allocator", optional = true } +uv-production-flate2-backend = { path = "../uv-production-flate2-backend", optional = true } anstream = { workspace = true } anyhow = { workspace = true }