Creating a C-accessible shared library in Swift?

Thanks for the feedback.

I've looked into _cdecl, but it seems to suffer from two major problems: it's not standardized or even officially supported, and it doesn't allow passing of Swift objects back into C to be held there. For example, if I create a handle in Swift, I have to pass it to the caller, who holds on to it. It doesn't seem possible to pass any sort of reference back to C that way.

Perhaps I'm wrong, though. Thanks again.