Skip to content

Build statically salt against libsodium#5

Open
benoitc wants to merge 5 commits into
freza:masterfrom
refuge:static
Open

Build statically salt against libsodium#5
benoitc wants to merge 5 commits into
freza:masterfrom
refuge:static

Conversation

@benoitc

@benoitc benoitc commented Nov 16, 2013

Copy link
Copy Markdown

Since libsodium is not widely deployed on the systems right now, it is useful to just embed libsodium in the sources and build statically against it. Also since salt is now built statically against libsodium it's easier to deploy with an erlang release.

For now the patch is only building libsodium on UNIX (and cygwin probably), build with MVS is not yet supported.

@freza

freza commented Nov 16, 2013

Copy link
Copy Markdown
Owner

Thanks, I like the idea of making salt more self-contained. Reviewing the changes now.

@benoitc

benoitc commented Nov 22, 2013

Copy link
Copy Markdown
Author

@freza what's the status about this PR. Anything I can do?

@freza

freza commented Nov 22, 2013

Copy link
Copy Markdown
Owner

Hi, sorry been busy -- I'll merge over the weekend. Wanted to make sure libsodium tests are always run after build (unconditionally), and that 32bit vs. 64bit build is selected correctly.

@freza

freza commented Jan 10, 2014

Copy link
Copy Markdown
Owner

As you certainly noticed I've been reluctant to do this -- I wanted a self-contained library from the start, but just including a snaphost of libsodium at some arbitrary point in time didn't feel right.

Now I've finally found the right way to do this: http://tweetnacl.cr.yp.to/software.html
It's NaCl in portable C, one small source file plus one small header file.

So I'll look into integrating that, would be good to also carry over tests from full NaCl.

@benoitc

benoitc commented Jan 13, 2014

Copy link
Copy Markdown
Author

Does it means you wil rewrite the nif from scratch?

@freza

freza commented Jan 13, 2014

Copy link
Copy Markdown
Owner

Of course not. TweetNaCl is API compatible with NaCl and libsodium, or so the paper suggests. So users can choose between small portable implementation that's included, or opt for faster external one.

@benoitc

benoitc commented Feb 28, 2014

Copy link
Copy Markdown
Author

@freza did you start any work about it?

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