gRPC-haskell/grpc-haskell.cabal
Joel Stanley c1fa7956c7 "Hellos" C++/Haskell programs for exercising interop for streaming modes (#49)
* Hellos example: skeleton and server-streaming mode use

* Catch IO exceptions in dispatchLoop

* Distinguish decoding errors from other errors; convert error calls to explicit throws of GRPCIOErrors

* instance Exception GRPCIOError

* Add error checks and error messages to hellos cpp client

* Change fixed32 to uint32

* Add prelim hellos-client, hellos-server executables

* Hellos cpp example: add client-streaming mode use

* In unregistered high-level server, aggressively catch all exceptions raised in
handlers and promote then to a new GRPCIOError constructor.

* Hellos hs example: add client-streaming mode use

* Hellos cpp example: add simple bidi mode use

* Hellos hs example: add simple bidi mode use

* wibbles

* Add GRPCIOErrorEq newtype wrapper w/ Eq instance for testing purposes

* Refactoring wibbles

* README wibbles

* DCR

* Fix rebase derp

* Remove libdl dep, update protobuf github link in hellos cpp Makefile.

* Use Data.Coerce.coerce for GRPCIOErrorEq; remove warnings

* Report expected/got errors in Haskell hellos client/server

* Report expected/got errors in cpp hellos client/server

* Add some instructions for running the hellos client/server

* Fix warnings

* Rename logShow to logMsg and use stderr for logging

* Tweak compliation parameters for hellos hs executables; increase constant workload

* Remove unnecessary type annotation

* Simplify handleError in dispatchLoop

* Remove GRPCIOErrorEq and coerce use; change GRPCIOHandlerException type
2016-07-26 15:21:35 -07:00

200 lines
5.2 KiB
Text

name: grpc-haskell
version: 0.0.0.0
synopsis: Haskell implementation of gRPC layered on shared C library.
-- description:
homepage: http://github.com/aloiscochard/grpc-haskell
license: Apache-2.0
license-file: LICENSE
author: Alois Cochard
maintainer: alois.cochard@gmail.com
copyright: Copyright 2015 Alois Cochard
category: Network
build-type: Simple
cabal-version: >=1.10
extra-source-files: cbits, include
Flag Debug
Description: Adds debug logging.
Manual: True
Default: False
flag with-examples
description: Also build example executables.
manual: True
default: True
library
build-depends:
base ==4.8.*
, clock >=0.6.0 && <=0.7.2
, bytestring ==0.10.*
, stm == 2.4.*
, containers ==0.5.*
, managed >= 1.0.5 && < 1.1
, pipes ==4.1.*
, transformers
, proto3-wire
, protobuf-wire
, async
, tasty >= 0.11 && <0.12
, tasty-hunit >= 0.9 && <0.10
, safe
, vector
c-sources:
cbits/grpc_haskell.c
exposed-modules:
-- NOTE: the order of these matters to c2hs.
Network.GRPC.Unsafe.Constants
Network.GRPC.Unsafe.Time
Network.GRPC.Unsafe.Slice
Network.GRPC.Unsafe.ChannelArgs
Network.GRPC.Unsafe.ByteBuffer
Network.GRPC.Unsafe.Metadata
Network.GRPC.Unsafe.Op
Network.GRPC.Unsafe
Network.GRPC.LowLevel
Network.GRPC.LowLevel.Server.Unregistered
Network.GRPC.LowLevel.Client.Unregistered
Network.GRPC.LowLevel.CompletionQueue
Network.GRPC.LowLevel.CompletionQueue.Internal
Network.GRPC.LowLevel.CompletionQueue.Unregistered
Network.GRPC.LowLevel.GRPC
Network.GRPC.LowLevel.Op
Network.GRPC.LowLevel.Server
Network.GRPC.LowLevel.Call
Network.GRPC.LowLevel.Call.Unregistered
Network.GRPC.LowLevel.Client
Network.GRPC.HighLevel
Network.GRPC.HighLevel.Generated
Network.GRPC.HighLevel.Server
Network.GRPC.HighLevel.Server.Unregistered
extra-libraries:
grpc
includes:
include/grpc_haskell.h
, grpc/grpc.h
, grpc/status.h
, grpc/support/time.h
, grpc/impl/codegen/compression_types.h
, grpc/impl/codegen/slice_buffer.h
, grpc/impl/codegen/slice.h
build-tools: c2hs
default-language: Haskell2010
ghc-options: -Wall -fwarn-incomplete-patterns -fno-warn-unused-do-bind -threaded
include-dirs: include
hs-source-dirs: src
default-extensions: CPP
if flag(debug)
CPP-Options: -DDEBUG
CC-Options: -DGRPC_HASKELL_DEBUG
executable hellos-server
if flag(with-examples)
build-depends:
base ==4.8.*
, async
, bytestring == 0.10.*
, containers ==0.5.*
, grpc-haskell
, proto3-wire
, protobuf-wire
, text
, transformers
else
buildable: False
default-language: Haskell2010
ghc-options: -Wall -g -threaded -rtsopts -with-rtsopts=-N -O2
hs-source-dirs: examples/hellos/hellos-server
main-is: Main.hs
executable hellos-client
if flag(with-examples)
build-depends:
base ==4.8.*
, async
, bytestring == 0.10.*
, containers ==0.5.*
, grpc-haskell
, proto3-wire
, protobuf-wire
, text
, transformers
else
buildable: False
default-language: Haskell2010
ghc-options: -Wall -g -threaded -rtsopts -with-rtsopts=-N -O2
hs-source-dirs: examples/hellos/hellos-client
main-is: Main.hs
executable echo-server
if flag(with-examples)
build-depends:
base ==4.8.*
, async
, bytestring == 0.10.*
, containers ==0.5.*
, grpc-haskell
, proto3-wire
, protobuf-wire
, text
else
buildable: False
default-language: Haskell2010
ghc-options: -Wall -g -threaded -rtsopts -with-rtsopts=-N -O2
hs-source-dirs: examples/echo/echo-server
main-is: Main.hs
executable echo-client
if flag(with-examples)
build-depends:
base ==4.8.*
, async
, bytestring == 0.10.*
, containers ==0.5.*
, grpc-haskell
, proto3-wire
, protobuf-wire
, text
, random
else
buildable: False
default-language: Haskell2010
ghc-options: -Wall -g -threaded -rtsopts -with-rtsopts=-N -O2
hs-source-dirs: examples/echo/echo-client
main-is: Main.hs
test-suite test
build-depends:
base ==4.8.*
, grpc-haskell
, bytestring ==0.10.*
, unix
, time
, async
, tasty >= 0.11 && <0.12
, tasty-hunit >= 0.9 && <0.10
, containers ==0.5.*
, managed >= 1.0.5 && < 1.1
, pipes ==4.1.*
, protobuf-wire
, transformers
, safe
, clock ==0.6.*
, turtle >= 1.2.0
, text
other-modules:
LowLevelTests,
LowLevelTests.Op,
UnsafeTests,
GeneratedTests
default-language: Haskell2010
ghc-options: -Wall -fwarn-incomplete-patterns -fno-warn-unused-do-bind -g -threaded -rtsopts
hs-source-dirs: tests
main-is: Properties.hs
type: exitcode-stdio-1.0
default-extensions: CPP
if flag(debug)
CPP-Options: -DDEBUG
CC-Options: -DGRPC_HASKELL_DEBUG