[swift-users] Swift Binary Size vs. Obj-C

Seth Friedman sethfri at gmail.com
Wed Jun 15 21:53:44 CDT 2016


I'm seeing 7.375 MB for Swift 3 dylibs with a Release build, and I don't
have WebKit, XPC, OnoneSupport, IOKit, CoreData, and AppKit in my binary
when I create just a bare bones app.

Thanks,
Seth

On Wed, Jun 15, 2016 at 5:59 PM Marco S Hyman <marc at snafu.org> wrote:

> On Jun 15, 2016, at 5:37 PM, Seth Friedman via swift-users <
> swift-users at swift.org> wrote:
> >
> > Does anyone know if the runtime libs definitively increased in size in
> Swift 3? I could have sworn I heard 4.5 MB for Swift 2.
>
> The total of the Frameworks dir in a Swift 2.2 app I have is 5.8M.  The
> breakdown for this app is:
>
>  64K    libswiftAppKit.dylib
> 4.8M    libswiftCore.dylib
>  44K    libswiftCoreData.dylib
> 112K    libswiftCoreGraphics.dylib
>  32K    libswiftCoreImage.dylib
>  84K    libswiftDarwin.dylib
>  40K    libswiftDispatch.dylib
> 516K    libswiftFoundation.dylib
>  64K    libswiftObjectiveC.dylib
>  48K    libswiftWebKit.dylib
>
> So how big might partially depend upon what frameworks the app uses.  The
> same app in Swift 3 is 6.6M -- a little bit bigger.  It’s breakdown is:
>
>  76K    libswiftAppKit.dylib
> 4.5M    libswiftCore.dylib
>  44K    libswiftCoreData.dylib
> 116K    libswiftCoreGraphics.dylib
>  36K    libswiftCoreImage.dylib
>  68K    libswiftDarwin.dylib
>  40K    libswiftDispatch.dylib
> 552K    libswiftFoundation.dylib
>  36K    libswiftIOKit.dylib
>  64K    libswiftObjectiveC.dylib
> 1.0M    libswiftSwiftOnoneSupport.dylib
>  48K    libswiftWebKit.dylib
>  36K    libswiftXPC.dylib
>
> The Swift 3 version is a debug build, the swift 2.2 version isn’t.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160616/d5e2c294/attachment.html>


More information about the swift-users mailing list