Distributing a rust binary

I have a binary build by rust cargo-lipo for iOS architecture.

How can I bundle the binary into an xcframework to distribute it via SPM as a binary dependency.

Cheers
Lukas
Looks like rust cargo-lipo creates an universal static library. You will have to split that up into separate libraries for iOS device and simulator, using lipo. After that, you can bundle it up using

Code Block xcodebuild -create-xcframework [-help] [-framework <path>] [-library <path> [-headers <path>]] -output <path>

I did the following and it works.
Just bundle .a for each architecture by using
Code Block xcodebuild -create-xcframework					-library ../pathToDeviceBinary/binary.a					-library ../pathToSimulatorBinary/binary.a					-headers ../pathToHeader/header.h

This builds a xcframework which works fine when I drop it into a Xcode project.

But I can not include it into a SPM package as binaryTarget.
If I do this the compiler does not see the C functions exposed in the bundled header.h file.

Is this not supported?
Distributing a rust binary
 
 
Q