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

Ankit Agarwal ankit at ankit.im
Thu Aug 4 23:31:49 CDT 2016


> 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/144b3236/attachment.html>


More information about the swift-evolution mailing list