Swift package dynamically linking self-built libraries

Hello! I'm trying to build a Rust library and wrap it in a Swift package. I don't think it makes sense to expect the library to installed globally, and I'm not sure how to ask the Swift package manager to include some particular dynamic libraries bundled up with the app. I can get everything to link if I manually separately add that library as a dependency everywhere that uses my package (and copy it into the xctest bundle, and so on), but that's not a very nice option.

Is there some supported way to add an externally built or vendored .dylib as a dependency of a package such that it gets copied into place and the linking behaves nicely?

Not currently. See [PITCH] Support for binary dependencies for a discussion of how this may become supported in the future.

Terms of Service

Privacy Policy

Cookie Policy