Skip to content

Conversation

@ronickg
Copy link
Contributor

@ronickg ronickg commented May 15, 2025

Adds the option to enable/disable libsodium. Disabled by default. The reason is to avoid unnecessary size added to the library when one doesn't use the functionality that requires libsodium.

Android (gradle.properties):

sodiumEnabled=true

iOS (Podfile)

ENV['SODIUM_ENABLED'] = '1'

Copy link
Collaborator

@boorad boorad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@renanmav
Copy link
Contributor

technically, if we disable sodium and run the example tests, they should fail, correct?

@renanmav
Copy link
Contributor

Looks like the env SODIUM_ENABLED is not being respected with bun pods.

$ SODIUM_ENABLED=0 bun pods
$ RCT_NEW_ARCH_ENABLED=1 bundle exec pod install --project-directory=ios
[NitroModules] 🔥 Your app is boosted by nitro modules!
[QuickCrypto]  💨 crypto just got quicker
[QuickCrypto] Has libsodium enabled!

@renanmav
Copy link
Contributor

Confirmed the failed test

Screenshot 2025-05-14 at 22 30 01

@ronickg
Copy link
Contributor Author

ronickg commented May 15, 2025

@renanmav Yes, the tests should fail and say one needs to enable sodium.
Regarding the SODIUM_ENABLED not being respected, did you comment out the line in the podfile ? Cause other it will override what u set in the terminal ?

Copy link
Contributor

@renanmav renanmav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed a small update on 5d5b156, that env is already overriden in the Podfile

ENV['RCT_NEW_ARCH_ENABLED'] = '1'
ENV['SODIUM_ENABLED'] = '1'

@renanmav renanmav merged commit b274004 into margelo:main May 15, 2025
7 checks passed
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.

3 participants