I've been playing with recent versions of Swift on Linux and think the
whole thing is rather neat. I'm most curious about how swift programs might
be embeddable in C projects.

I found a number of documentation artifacts about calling C functions and
providing Swift callbacks to C, but none about how to disable mangling of
symbols or doing whatever else was necessary to allow C programs to link a
Swift .o/.so.

Also ambiguous to me are runtime requirements, particularly in terms of
background threads and memory management. Many of the target C programs I
have their in mind have their own memory and concurrency management
strategies, e.g. extensions for Python, Ruby, Postgres...

Is this something that works? Or could be made to work? Has a lot of subtle
problems besides throwing "convention(c)" on some functions and turning off
mangling?

Thanks for considering my questions.
_______________________________________________
swift-users mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to