packages feed

s2n-tls-ffi-0.1.0.0: s2n-tls-ffi.cabal

cabal-version:      3.0
name:               s2n-tls-ffi
version:            0.1.0.0
synopsis:           Low-level FFI bindings to the s2n-tls library
description:
    Low-level FFI bindings to the s2n-tls library.

license:            Apache-2.0
license-file:       LICENSE
author:             Daniel Goertzen
maintainer:         daniel.goertzen@gmail.com
copyright:          2026 Daniel Goertzen
category:           Cryptography, FFI, Network
build-type:         Simple
tested-with:        GHC == 9.8.2
extra-doc-files:
    CHANGELOG.md
    README.md
extra-source-files: cbits/s2n_wrapper.h
homepage:           https://github.com/goertzenator/s2n-tls-ffi
bug-reports:        https://github.com/goertzenator/s2n-tls-ffi/issues

source-repository head
    type:     git
    location: https://github.com/goertzenator/s2n-tls-ffi.git

source-repository this
    type:     git
    location: https://github.com/goertzenator/s2n-tls-ffi.git
    tag:      v0.1.0.0

library
    exposed-modules:
        S2nTls.Ffi
        S2nTls.Ffi.Types

    build-depends:
        base >= 4.14 && < 5
      , unix >= 2.7 && < 2.9

    hs-source-dirs:   src
    default-language: GHC2021
    ghc-options:      -Wall -haddock

    -- C wrapper for capturing error info from thread-local storage
    c-sources:        cbits/s2n_wrapper.c
    include-dirs:     cbits

    -- Required for Linked mode (symbols loaded via dlopen(NULL))
    extra-libraries:  s2n

test-suite memory-safety
    type:             exitcode-stdio-1.0
    main-is:          MemorySafety.hs
    hs-source-dirs:   test
    default-language: GHC2021
    build-depends:
        base >= 4.14 && < 5
      , s2n-tls-ffi
    ghc-options:      -threaded -rtsopts "-with-rtsopts=-N"