Repository navigation
build: build released wheels with one codegen unit per crate - #1340
Merged
Merged
Conversation
Raise the wheel job timeout to 120 minutes for cold dist builds on Windows and macOS, and build the release-performance candidate with the dist profile the published baseline uses.
kvlonge
enabled auto-merge (squash)
November 7, 2026 08:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Every release adds about 230 MB to PyPI, which hit its 25 GB limit with 0.195.0. The native extension is almost the whole wheel (43 of 45 MB compressed); it is already stripped, so the bulk is generic code that the default 16 parallel codegen units each instantiate.
Changes
distcargo profile:releasewithcodegen-units = 1.cargo-profileinput, defaulting todist, for both native builds. Release Distributions and Publish therefore build released wheels with it unchanged.release, so its build time does not double.dist, like the published baseline.Rejected: fat LTO with 1 unit gave 40.1 MB at 3.1x build time and 7.9 GB peak; fat LTO with 16 units saved 0.4%.
DuckShop: not applicable. This is a build profile; compiled output is identical.
Verification
Same orb, rustc 1.99.1, linux x86_64, cold builds:
sqb playground pgcompile and build PASS=99,sqb serverserving/, deep links,/login.uv buildwithMATURIN_PEP517_ARGS=--profile distrunsmaturin pep517 build-wheel --profile distand builds intotarget/dist.make check-ci, public-repository scan.