Support "zippered" macOS binaries
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Dynamic libraries on macOS can be built in a way that allows loading them when running under Mac Catalyst as well. This is similar in spirit to universal binaries, but technologically different in that only a single binary and architecture is actually built, which allows for a lot of code sharing.
This can be used in Xcode when creating XCFramework bundles, and is underpinned by the the -darwin-target-variant flag in Clang - but that's the only official docs I could find on it. I did find this note though that explains the details really well.
If we wanted to support this in rustc, there's two questions that need answering:
- How does the user activate it? A separate triple? An extra commandline flag?
- How does the user detect this mode of compilation in their code?
cfg(all(target_os = "macos", target_abi = "macabi"))?target_abi = "zippered"?
Opening this issue to have a place to refer back to, I'm undecided whether it's worth the effort to try to support, would like to see a concrete use-case first (if you know of one, please comment below!)
@rustbot label O-ios O-macos C-feature-request A-targets
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the issue's Clang -darwin-target-variant reference and the linked note on building a zippered dylib, then examine how rustc represents target triples, command-line options, and cfg values. Establish a concrete use case and decide how users would activate and detect this compilation mode; the issue is done only when those design questions have an agreed direction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100