Evolving SwiftPM Builds with Swift Build

There’s the XCFramework format itself, and there’s the SwiftPM binary dependencies feature which happens to be built on top of XCFrameworks on Apple platforms.

When SwiftPM binary dependencies were originally proposed, the consensus landed on deferring support for non-Apple platforms due to various complexities especially on Linux.

Now that the reference implementation of XCFramework is Open Source, it may be worth revisiting the topic, but I could see it going either way - extending XCFrameworks could be the path forward, or perhaps SwiftPM’s binary dependencies feature could use one or more different formats for the other platforms, especially if there are existing formats that might be more appropriate.

I’d encourage reading up on [PITCH] Support for binary dependencies - #74 by jakepetroules if you haven’t already, which contains a lot of great background information and some of the difficulties on Linux in particular due to it having such a vast number of possible ABIs and no clear and canonical way to identify them.

Personally I think it wouldn’t be too hard to add at least Windows and Android, but we should go into more detail in a dedicated thread if you or someone else would like to kick off that discussion.

3 Likes