rustls: TLS bindings for Rustls

[ cryptography, library, network ] [ Propose Tags ]

TLS bindings for Rustls via rustls-ffi.

[Skip to Readme]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS],,
Change log
Dependencies base (>=4.16 && <5), bytestring (>=0.10 && <0.13), derive-storable (>=0.3 && <0.4), network (>=3.1 && <3.2), resourcet (>=1.2 && <1.4), text (>=2.0 && <2.2), transformers (>=0.5.6 && <0.7) [details]
License CC0-1.0
Author amesgen
Category Cryptography, Network
Home page
Bug tracker
Source repo head: git clone
Uploaded by amesgen at 2024-04-06T11:41:54Z
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 158 total (10 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for rustls-

[back to package description]

hs-rustls — Rustls for Haskell

CI Hackage

Haskell bindings for the Rustls TLS library via rustls-ffi.

See the haddocks for documentation.

Also see:


With Nix

When developing this library, just drop into a Nix shell.

If you want to depend on this library in another package, you have to make sure to include rustls-ffi as a native dependency. You can do so by depending on the github:amesgen/hs-rustls?dir=nix-rustls flake, and then using the nix-rustls.packages.${system}.default output.

Without Nix


Make sure to have Cargo installed. Then, clone and install rustls-ffi:

git clone -b v0.13.0
cd rustls-ffi
make DESTDIR=/path/to/some/dir install

Then, in a cabal.project.local, add these lines:

extra-include-dirs: /path/to/some/dir/include
extra-lib-dirs:     /path/to/some/dir/lib

With this, Cabal should be able to find the rustls-ffi native library.

Note: This process might become less manual if sth like haskell/cabal#7906 lands in Cabal.


When running the tests in this repo, you have to have minica and miniserve installed.