Isolate universal2 artifact-combination logic#572
Open
jakelishman wants to merge 1 commit intoPyO3:mainfrom
Open
Isolate universal2 artifact-combination logic#572jakelishman wants to merge 1 commit intoPyO3:mainfrom
universal2 artifact-combination logic#572jakelishman wants to merge 1 commit intoPyO3:mainfrom
Conversation
The combination of the multiple build artifacts into one universal2-compatible artifact is now done as part of the general artifact-path handling, which means we no longer have to sort out the configuration environment twice for the same system, and we no longer rely on `cargo` returning information about the built artifacts in the same order between two separate compilations. Beyond the immediate benefit of isolating the "create binary artifacts" logic into only a single place, this commit is intended to be a refactor along the path towards support for extracting non-binary artifacts that are side-effects of particular `RustExtension`'s build scripts.
This was referenced Feb 17, 2026
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.
The combination of the multiple build artifacts into one universal2-compatible artifact is now done as part of the general artifact-path handling, which means we no longer have to sort out the configuration environment twice for the same system, and we no longer rely on
cargoreturning information about the built artifacts in the same order between two separate compilations.Beyond the immediate benefit of isolating the "create binary artifacts" logic into only a single place, this commit is intended to be a refactor along the path towards support for extracting non-binary artifacts that are side-effects of particular
RustExtension's build scripts.This supersedes #571, and is a step towards #563 as mentioned (spiritually) in #563 (comment).
I haven't added any new tests here since it isn't new behaviour, though I couldn't immediately see that the tests in the repo already cover the
universal2case. If there's a good way to add them, I can.I tested it myself locally to verify it produces
universal2artifacts, and it at least managed to import the resulting object on my ARM Mac (and it's about the right size, and the object functions, etc).The changes are larger-scale than might be expected because I had to refactor several places of target detection to account for a build process that doesn't necessarily just have a single target triple.