[swift-users] Compiling C-usable objects/shared objects

Daniel Farina daniel at fdr.io
Mon Apr 11 14:08:42 CDT 2016


On Mon, Apr 11, 2016 at 12:04 PM Joe Groff <jgroff at apple.com> wrote:

> > Yes, that's exactly the goal. One follow-up question: I'm not so much
> concerned about there existing some runtime, but rather what is in it.  In
> particular, threads, memory management that is hard to integrate with other
> programs, or something else that you might think an impediment to embedding
> in other programs that have concurrency or memory models.
>
> Swift's runtime consists mostly of the runtime database for generic type
> metadata and associated casting/querying logic, and support for reference
> counting and allocation of Swift classes and other heap objects. The type
> database takes up memory, but is all lazily initialized and
> concurrency-safe so should be mostly invisible to external code.
> Interfacing Swift reference counting with other memory management systems
> has many of the same challenges as would other reference counting schemes,
> such as ObjC, COM, or GObject, but should be straightforward compared to,
> say, a GC system where pinning objects is necessary while they're
> accessible from C.
>

That's wonderful. Okay, I'll play with this. Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160411/ad839a99/attachment.html>


More information about the swift-users mailing list