[swift-users] C/FFI interop

David Turnbull dturnbull at gmail.com
Wed Dec 23 23:11:37 CST 2015

Option 1. Export your Swift to Obj-C. Write Obj-C that exports C. Compile
to a library.

Option 2. Use this syntax and swift-demangle to figure out the symbols:

public var badfood:@convention(c)(Int) -> Void = { (i:Int) in




On 12/23/15, Thomas Catterall via swift-users <swift-users at swift.org> wrote:
> > Indeed I was - I'm quite sorry for the confusion, I didn't make my intent
> > clear as I should have, such as through example. What I'm referring to
> is,
> > for instance, offering a way for a Ruby library to interface with a
> module
> > written in Swift to communicate with Redis (as an example, not something
> I'm
> > thinking too seriously about).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20151223/d3e89be1/attachment.html>

More information about the swift-users mailing list