Skip to content

kozross/cryptography-libsodium

 
 

Repository files navigation

cryptography-libsodium-bindings CI made with Haskell

cryptography-libsodium-bindings exposes a set of FFI bindings from the libsodium-1.0.18-stable library.

Here are the principles of the library (from our STRUCTURE document):

  • Users of this library should never have to even think about how the libraries are bundled or linked to.
  • This library does not have any dependencies other than base.
  • The documentation for the modules must be strong enough to stand alone.
  • CI checks that the wrapping or bundling works correctly. This includes checks on Windows.

Comparison with other libraries

These other libraries available in Hackage provide bindings to libsodium. Here are how they differ from cryptography-libsodium-bindings:

saltine is a library maintained by Max Amanshauser.

The library dynamically links to the system's libsodium 1.0.18 through pkg-config and depends on several non-base packages like bytestring, deepseq, hashable, profunctors and text-1.2.
It supports GHC from 8.0.2 to 9.0.1. saltine combines both FFI bindings and Haskell utilities, and uses the ccall FFI calling convention convention. Its documentation meets our quality standards

In comparison, cryptography-libsodium-bindings statically links to libsodium 1.0.18-stable, and does not depend on non-base packages. In particular, since there is no dependency on text, you are free to use text-2.0 or stay on the 1.2 branch. cryptography-libsodium-bindings only provides FFI bindings, and can be used as a dependency by higher-level interfaces. It supports GHC from 8.10.7 to 9.2.1. Moreover, it follows the latest GHC recommendations regarding foreign imports, and uses the capi calling convention.

libsodium is a library maintained by Renzo Carbonara.

The library dynamically links to the system's libsodium 1.0.18 through pkg-config and does not depend on non-base packages. It requires c2hs to be installed on the developer's system, and supports GHC from 8.6.5 to 8.10.1 libsodium only provides FFI bindings, and uses the ccall FFI calling convention.
Documentation is lacking from the project, and requires a back-and-forth between the package and the libsodium documentation.

In comparison, cryptography-libsodium-bindings statically links to libsodium 1.0.18, and does not use c2hs. It supports GHC from 8.10.7 to 9.2.1. cryptography-libsodium-bindings uses the capi FFI calling convention.
The documentation of the project aims to render the user self-sufficient.

About

Embedded bindings to libsodium for Haskell

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 79.1%
  • Makefile 9.9%
  • Shell 7.3%
  • M4 1.3%
  • Assembly 1.1%
  • Haskell 0.5%
  • Other 0.8%