Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional xcframework support for Linux #7239

Closed

Conversation

hassila
Copy link

@hassila hassila commented Jan 10, 2024

Provide experimental support for XCFrameworks for Linux for well-defined, identical, deployments.

Motivation:

Providing informal, experimental support for (very) heterogenous cluster deployments on Linux as discussed previously in #5714

It allows for deployments which use XCFrameworks and library evolution on identically patches / toolchains on Linux as an interim escape hatch until wider support might be available.

Modifications:

Enable XCFrameworks for Linux if the _SWIFTPM_EXPERIMENTAL_LINUX_XCFRAMEWORK environment variable is set.

Result:

Users may experiment with library evolution and XCFrameworks on Linux without having to roll their own toolchains while waiting for wider support for shared libraries / evolution on Linux in general.

The default behavior remains unchanged and there should be zero impact for users who doesn't set this environment variable.

@MaxDesiatov
Copy link
Contributor

MaxDesiatov commented Jan 10, 2024

To manage expectations on this, I personally don't think XCFrameworks should be ever supported anywhere outside of builds on macOS with the Xcode build system. It's an Xcode-specific format that's not meant to be cross-platform outside of Xcode use cases isolated to Darwin. The proper format for true cross-platform binary libraries is .artifactbundle, which was designed in the open specifically for that purpose.

Thus if you'd like to push forward with the overall concept of cross-platform binary libraries, I advise switching to .artifactbundle and improving upon #6967 with questions addressed that we've identified in #7035 (comment).

@hassila
Copy link
Author

hassila commented Jan 10, 2024

Thanks @MaxDesiatov, we'll have a look at that, appreciate the pointers.

@hassila hassila closed this Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants