[swift-build-dev] C dependencies

Drew Crawford drew at sealedabstract.com
Sat Dec 12 07:04:55 CST 2015

I noticed the README for the package manager seems to take a strong view of source distribution:

> Packages are distributed and consumed as source code, rather than pre-compiled binaries.
> Although it requires additional computational resources, this approach guarantees that developers can adopt new features on platforms they support, without being reliant on vendors to supply updated dependencies. This also has the advantage of allowing tools to do things like automated testing and API analysis of package dependencies.

I maintain a lot of Swift software with C dependencies.  For example, I develop Swift frameworks that ship with libsodium statically linked.  AFAIK the new Foundation will have various C dynamic and static dependencies.  Etc.

What is the vision for distributing this software with the package manager?

1.  Will it barf if the user does not have the C dependencies already installed on their machine?
    1a.  What about iOS, where there is no concept of this?  Can I not build iOS libraries using the package manager?
2.  Are all binary packages forbidden?  Is there any mechanism like homebrew's bottles for distributing software that is arcane to compile?
3.  Can I write a script that tries to resolve various C dependencies my project needs to link with?
4.  Is it a design goal to distribute Foundation via the package manager?

More information about the swift-build-dev mailing list