Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated LibSession to be sourced via Swift Package Manager #1025

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

mpretty-cyro
Copy link
Collaborator

This PR updates the project to use a pre-built version of libSession installed via Swift Package Manager (see libsession-util.xcframework.zip from https://github.com/oxen-io/libsession-util/releases/tag/v1.2.0-rc.1) by default instead of building from source and removes the submodule making the project easier to work with for those without experience dealing with CMake or complicated C/C++ dependenices

Additionally it adds a new Session_CompileLibSession scheme which can be used to build libSession from source (as we did prior to this PR) if desired

  • There are new Debug_Compile_LibSession and App_Store_Release_Compile_LibSession configurations which set a COMPILE_LIB_SESSION environment variable that build_libSession_util.sh uses to determine whether it should use the pre-built framework or build from source
  • There is a new LIB_SESSION_SOURCE_DIR User-Defined build setting which can be used to point at the libSession source directory (currently set to ${SRC_ROOT}/../LibSession-Util)

Some quick stats on the differences between using the pre-built framework or building from source using an M1 Pro:

Build from Source Pre-Built Reduction
Device 285.3 seconds 52.7 seconds ~82%
Simulator 280.2 seconds 48.0 seconds ~83%
Archive 402.8 seconds 166 seconds ~60%

• Using a pre-built version of libSession as a SPM dependency for default builds
• Added a new scheme which will try to build libSession from source (update the `LIB_SESSION_SOURCE_DIR` User-Defined build setting to change the location - currently set to '${SRC_ROOT}/../LibSession-Util')
• Removed the libSession submodule
@mpretty-cyro mpretty-cyro self-assigned this Sep 20, 2024
@mpretty-cyro
Copy link
Collaborator Author

I want to hold off on merging this one until the code review feedback & changes for the libQuic PR on libSession is done and the PR merged (oxen-io/libsession-util#83) as that should result in less "arbitrary" changes being made to libSession which would require a new release to be made for iOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants