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

Full libsodium build #249

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aidantwoods
Copy link
Collaborator

I re-ran dist-build/apple-xcframework.sh from libsodium with LIBSODIUM_FULL_BUILD=1, and manually corrected the file Sodium/libsodium/version.h to match. For the sake of simplicity about what actually changed, I also re-ordered the AvailableLibraries array in Clibsodium.xcframework/Info.plist from what was output by this script so as to match the current file ordering (and therefore this file is now unchanged).

This was run using Xcode 12.5.1 on revision 7d71804ee05f71b65c94282f706c5aa82b279e8a of libsodium (as currently documented in the readme).

This exposes some currently missing functionality from Clibsodium

#ifndef SODIUM_LIBRARY_MINIMAL
# include "crypto_box_curve25519xchacha20poly1305.h"
# include "crypto_core_ed25519.h"
# include "crypto_core_ristretto255.h"
# include "crypto_scalarmult_ed25519.h"
# include "crypto_scalarmult_ristretto255.h"
# include "crypto_secretbox_xchacha20poly1305.h"
# include "crypto_pwhash_scryptsalsa208sha256.h"
# include "crypto_stream_salsa2012.h"
# include "crypto_stream_salsa208.h"
# include "crypto_stream_xchacha20.h"
#endif

Even though this doesn't change the swift library, I think it makes sense for this package to make all of libsodium available in-case any of the low level functionality is needed?

I've opened this PR for convenience, but I won't be offended if you prefer to build the modified binaries yourself :)

Closes #248

Reran dist-build/apple-xcframework.sh with LIBSODIUM_FULL_BUILD=1.
This was run using Xcode 12.5.1 on revision
7d71804ee05f71b65c94282f706c5aa82b279e8a of libsodium.
@johnalanwoods
Copy link
Contributor

nice, this would be useful.

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.

Clibsodium without SODIUM_LIBRARY_MINIMAL?
2 participants