[swift-users] How do you dynamically load a module on Linux?

Edward Connell ewconnell at gmail.com
Mon Oct 31 14:41:30 CDT 2016


On OSX my application loads a bundle from the PlugIns directory. It loads
and executes perfectly.

Now I'm painfully trying to port my code to Linux, where we don't seem to
have frameworks or bundles per se. I assumed a bundle is just a dynamic lib
or module. My build creates a PlugIns directory and copies the plugins
.swiftmodule and .swiftdoc files into that directory hoping the load api
would work.

When I call

Bundle.paths(forResourcesOfType: "swiftmodule", inDirectory: dir)

I get zero results. I'm not even sure if this is heading in the right
direction.

How do I dynamically load a module on Linux?

Thanks, Ed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20161031/c4566a92/attachment.html>


More information about the swift-users mailing list