aperedera / SwiftZSTD

Swift wrapper around ZSTD compression lib
Other
67 stars 15 forks source link

Update for Xcode 12 & SPM #9

Closed ArnaudWurmel closed 2 years ago

ArnaudWurmel commented 2 years ago

Hello,

As we are using this framework for our application, and we are migrating from Carthage to SwiftPM, I looked at the issue #7 and the work from @alizx.

Some architectural changes were required to make it work but I tried as much as possible to not modify the code that you did in the past.

This PR isn't supporting Carthage anymore since I couldn't find something to make it work. If anyone is interested to make the Carthage support, I would gladly update my PR with his modifications.

The iOSTestApp (that only import the framework to try the compilation) is not included anymore as it's much more complicated to import the SPM framework in a local app and the gain provided is very low.

The project must be splitted because SPM doesn't support mixed language for a same target. So I went for these three targets:

SwiftZSTDC is depending on zstdlib target and SwiftZSTD is depending on both zstdlib and SwiftZSTDC targets.

Finally, the targets are grouped into the same library file (SwiftZSTD).