[swift-evolution] [swift 4] static libs/modular code, fixed-size arrays, ref/pointer to structs, pointers, numeric types.

Raphael Sebbe raphael at creaceed.com
Fri Aug 5 02:17:10 CDT 2016

thank you Ankit for that information.

Do you mean a single (SwiftPM) repository could handle the 5 static libs I
was mentioning in my first mail, with apps linking selectively with those,
as opposed to entire module/product? That'd be great.

Also, what about the state of integration in Xcode, can those setup
(SwiftPM packages) work somehow for development (including debugging, code
completion, etc), or is it something mostly distinct for now?



On Fri, Aug 5, 2016 at 6:32 AM Ankit Agarwal <ankit at ankit.im> wrote:

> Swift, with its extension concept, is very well suited to modular
>> development like this. We'd like to have a better option than frameworks to
>> build reusable libraries. It's not an ABI thing, we really don't care about
>> that, we use libs just to organize code, building them as a part of the
>> app, and *not* to provide precompiled libraries to some other developers.
>> Swift package manager does not work well within Xcode either at this time,
>> and has a number of constraints we don't want (like having a separate git
>> repo for each static lib -> that's not practical at all if you just have 1
>> or 2 files in that lib).
> You don't need to create one repo for each static library. A SwiftPM
> package consists of Modules. You can create any number of products
> consisting of one or more modules using the Product API in manifest file.
> for eg:
> products += [Product(name: "StaticLibA", type: .Library(.Static), modules:
> "Foo"), Product(name: "StaticLibB", type: .Library(.Static), modules:
> "Foo", "Bar")]
> --
> Ankit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160805/b0182bd6/attachment.html>

More information about the swift-evolution mailing list