gRPC-haskell/core
2021-06-29 11:02:49 -05:00
..
cbits Add 1 to malloc'd buffer size for null terminator (#128) 2021-06-22 14:58:44 -07:00
include Add max metadata size option (#67) 2018-07-27 10:41:18 -05:00
src/Network/GRPC grpc-haskell-core: -Wall -Werror and fix warnings 2021-06-29 11:02:49 -05:00
tests grpc-haskell-core: -Wall -Werror and fix warnings 2021-06-29 11:02:49 -05:00
default.nix Extract lowlevel bits into a core package (#42) 2018-01-29 08:59:34 -08:00
grpc-haskell-core.cabal grpc-haskell-core: -Wall -Werror and fix warnings 2021-06-29 11:02:49 -05:00
LICENSE Extract lowlevel bits into a core package (#42) 2018-01-29 08:59:34 -08:00
README.md Extract lowlevel bits into a core package (#42) 2018-01-29 08:59:34 -08:00
Setup.hs Extract lowlevel bits into a core package (#42) 2018-01-29 08:59:34 -08:00
shell.nix Port grpc-haskell[-core] to ghc-8.6 and modern tasty. (#77) 2019-03-25 16:52:04 -07:00

Attribution

This library is a fork of https://github.com/aloiscochard/grpc-haskell that we have extended and released under the same LICENSE

Installation

The current version of this library requires gRPC version 1.34.1. Newer versions may work, but have not been tested.

Usage

There is a tutorial here

Building and testing

nix-build release.nix -A grpc-haskell will build and test the whole thing and put the completed package into the nix store. nix-shell can be used to give you a development environment where you can use cabal for development and testing:

$ nix-shell
...
Running: cabal configure --extra-include-dirs ... --extra-lib-dirs ... --enable-tests
...
[nix-shell]$ cabal build && cabal test

Note that cabal configure is run automatically upon nix-shell entry so that the build can reference include and library paths for the grpc and gpr libraries.

Using the Library

You must compile with -threaded, because we rely on being able to execute Haskell while blocking on foreign calls to the gRPC library. If not using code generation, the recommended place to start is in the Network.GRPC.HighLevel.Server.Unregistered module, where serverLoop provides a handler loop.