name:                proto3-wire
version:             1.2.0
synopsis:            A low-level implementation of the Protocol Buffers (version 3) wire format
license:             Apache-2.0
license-file:        LICENSE
author:              Awake Networks
maintainer:          opensource@awakenetworks.com
copyright:           2016 Awake Networks
category:            Codec
build-type:          Simple
cabal-version:       >=1.10
extra-source-files:  CHANGELOG.md

library
  exposed-modules:     Proto3.Wire
                       Proto3.Wire.Builder
                       Proto3.Wire.Class
                       Proto3.Wire.Decode
                       Proto3.Wire.Encode
                       Proto3.Wire.Reverse
                       Proto3.Wire.Reverse.Prim
                       Proto3.Wire.Tutorial
                       Proto3.Wire.Types
  other-modules:       Proto3.Wire.Reverse.Internal
                       Proto3.Wire.Reverse.Width
  build-depends:       base >=4.12 && <=5.0,
                       bytestring >=0.10.6.0 && <0.11.0,
                       cereal >= 0.5.1 && <0.6,
                       containers >=0.5 && < 0.7,
                       deepseq ==1.4.*,
                       ghc-prim >=0.5.3 && <0.7,
                       hashable <1.4,
                       parameterized >=0.5.0.0 && <1,
                       primitive >=0.6.4 && <0.8,
                       safe ==0.3.*,
                       text >= 0.2 && <1.3,
                       transformers >=0.5.6.2 && <0.6,
                       unordered-containers >= 0.1.0.0 && <0.3,
                       vector >=0.12.0.2 && <0.13,
                       QuickCheck >=2.8 && <3.0

  hs-source-dirs:      src
  default-language:    Haskell2010
  ghc-options:         -O2 -Wall -fobject-code
  -- Add any other architectures on which an unaligned poke of a multibyte
  -- value would succeed and be faster than writing the bytes one by one.
  if arch(x86_64) || arch(i386)
    cpp-options:       -DUNALIGNED_POKES

test-suite tests
  type:                exitcode-stdio-1.0
  main-is:             Main.hs
  hs-source-dirs:      test
  default-language:    Haskell2010
  build-depends:       base >=4.9 && <=5.0,
                       bytestring >=0.10.6.0 && <0.11.0,
                       cereal >= 0.5.1 && <0.6,
                       doctest >= 0.7.0 && <0.18,
                       proto3-wire,
                       QuickCheck >=2.8 && <3.0,
                       tasty >= 0.11 && <1.3,
                       tasty-hunit >= 0.9 && <0.11,
                       tasty-quickcheck >= 0.8.4 && <0.11,
                       text >= 0.2 && <1.3,
                       transformers >=0.5.6.2 && <0.6,
                       vector >=0.12.0.2 && <0.13