From 05ed9112d8b9852a737b4d35adc3a2c56325b1d6 Mon Sep 17 00:00:00 2001 From: "w.pomp" Date: Thu, 29 Oct 2026 17:20:13 +0100 Subject: [PATCH] build: keep debug info in the test profile only, not release [profile.release] debug = true forced full DWARF into release builds. On ELF targets (the manylinux/musllinux wheels) the debug sections are embedded in the .so (~160 MB, over PyPI's 100 MB file limit); MSVC emits a sidecar .pdb instead and the apple/zig link path drops it, so only the Linux wheels were bloated. Move debug=true to [profile.test] so cargo still gets readable backtraces without fattening the release wheels. --- Cargo.toml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index eaca1a9..860601d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,9 +17,15 @@ categories = ["multimedia::images", "science"] [profile.test] inherits = "release" +# Full debug info goes in the TEST profile only (readable cargo-test +# backtraces). It must NOT be in the release profile: on ELF targets +# (Linux/musl wheels) the DWARF gets embedded in the .so (~160 MB, over +# PyPI's 100 MB limit) - MSVC puts it in a sidecar .pdb and the +# apple/zig link path drops it, which is why only the Linux wheels were +# bloated. +debug = true [profile.release] -debug = true [profile.dev.package.backtrace] opt-level = 3