c76656f9c4
`cabal` seems to want to download a newer c2hs than what is available on path at the current nixpkgs pin, and I haven't been able to figure out how to force it to do otherwise (open to suggestions). For now, we just cabal slurp it from Hackage rather than using the nixpkgs version. /shrug |
||
---|---|---|
.github/workflows | ||
bench | ||
bin | ||
core | ||
examples | ||
nix | ||
src/Network/GRPC | ||
tests | ||
.gitignore | ||
default.nix | ||
grpc-haskell.cabal | ||
LICENSE | ||
nixpkgs.nix | ||
README.md | ||
release.nix | ||
Setup.hs | ||
shell.nix | ||
stack.yaml |
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.2.0. 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
[nix-shell]$ cabal configure --enable-tests && cabal build && cabal test
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.