You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While it is possible to load Frameworks on macOS using `Bundle` it is still not possible to call functions that use Swift types (unless they are bridged to Obj-C).
On Linux this looks even more bleak. Bundle is mostly unimplemented and using `dlopen` only allows for calling C functions by casting them to the assumed signature.
So the first request would be (leaving out the macOS part for now) that it is possible to load an SPM generated dylib/framework on Linux and use the runtime to safely call methods on exposed classes. This should include all of Swift's types, not only C functions. This would allow for creating a useful "plugin" architecture using Swift (something that is sorely missing from the Swift story so far)
Later on this should be ported to macOS, so the Obj-C requirement goes away.
While ABI stability might be a concern here I think it is important to have this functionality even while the ABI is not stable. This would still be useful for cases where the "plugins" are compiled at the same time as the host application.
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: d74ba92f6e0a0153771974e09e6705d7
Issue Description:
While it is possible to load Frameworks on macOS using `Bundle` it is still not possible to call functions that use Swift types (unless they are bridged to Obj-C).
On Linux this looks even more bleak. Bundle is mostly unimplemented and using `dlopen` only allows for calling C functions by casting them to the assumed signature.
So the first request would be (leaving out the macOS part for now) that it is possible to load an SPM generated dylib/framework on Linux and use the runtime to safely call methods on exposed classes. This should include all of Swift's types, not only C functions. This would allow for creating a useful "plugin" architecture using Swift (something that is sorely missing from the Swift story so far)
Later on this should be ported to macOS, so the Obj-C requirement goes away.
While ABI stability might be a concern here I think it is important to have this functionality even while the ABI is not stable. This would still be useful for cases where the "plugins" are compiled at the same time as the host application.
The text was updated successfully, but these errors were encountered: