packages feed

crc32c-0.2.2: crc32c.cabal

cabal-version: 2.2

name:           crc32c
version:        0.2.2
description:    Haskell bindings for crc32c
synopsis:       crc32c
category:       FFI, Raw
homepage:       https://github.com/leptonyu/crc32c#readme
author:         Daniel YU
maintainer:     leptonyu@gmail.com
copyright:      (c) Daniel YU
license:        BSD-3-Clause
license-file:   LICENSE
build-type:     Simple
extra-source-files:
    README.md
    ChangeLog.md
    include/LICENSE
    include/crc32c_arm64.h
    include/crc32c_arm64_check.h
    include/crc32c_internal.h
    include/crc32c_prefetch.h
    include/crc32c_read_le.h
    include/crc32c_round_up.h
    include/crc32c_sse42.h
    include/crc32c_sse42_check.h
    include/crc32c/crc32c.h
    include/crc32c/crc32c_config.h

library
  exposed-modules:
      Data.Digest.CRC32C
  hs-source-dirs:
      src
  build-depends:
      base >=4.9 && <5
    , bytestring >=0.11.5
  default-language: Haskell2010

  include-dirs:
      include
  cxx-sources:
      include/crc32c.cc
      include/crc32c_arm64.cc
      include/crc32c_portable.cc
      include/crc32c_sse42.cc
  cxx-options: -std=c++11
  if impl(ghc >= 9.4)
    build-depends: system-cxx-std-lib
  else
    extra-libraries:
      stdc++
  if (arch(x86_64) && !os(windows))
    cxx-options: -DHAVE_SSE42=1 -msse4.2
  if arch(arm)
    cxx-options: -DHAVE_ARM64_CRC32C=1

test-suite crc32c-test
  type: exitcode-stdio-1.0
  main-is: Spec.hs
  hs-source-dirs:
      test
  build-depends:
      QuickCheck
    , base
    , bytestring
    , crc32c
    , hspec
    , hspec-core
  default-language: Haskell2010

benchmark crc32c-bench
  type: exitcode-stdio-1.0
  main-is: Bench.hs
  hs-source-dirs: bench
  build-depends:
      base
    , bytestring
    , crc32c
    , criterion
  default-language: Haskell2010