2017-02-28 22:42:14 +01:00
|
|
|
Attribution
|
|
|
|
-----------
|
|
|
|
|
|
|
|
This library is a fork of https://github.com/aloiscochard/grpc-haskell that we
|
|
|
|
have extended and released under the same [`LICENSE`](./LICENSE)
|
|
|
|
|
2017-02-15 00:39:58 +01:00
|
|
|
Installation
|
|
|
|
------------
|
|
|
|
|
2022-07-30 04:27:27 +02:00
|
|
|
**The current version of this library requires gRPC version 1.46.3. Newer versions may work but have not been tested.**
|
2017-05-01 00:38:29 +02:00
|
|
|
|
2017-02-15 00:39:58 +01:00
|
|
|
Usage
|
|
|
|
-----
|
|
|
|
|
2017-05-01 00:38:29 +02:00
|
|
|
There is a tutorial [here](examples/tutorial/TUTORIAL.md)
|
|
|
|
|
2016-12-19 23:53:44 +01:00
|
|
|
Building and testing
|
|
|
|
--------------------
|
|
|
|
|
2021-01-14 00:56:23 +01:00
|
|
|
`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:
|
2016-07-26 01:37:06 +02:00
|
|
|
|
2022-07-30 04:27:27 +02:00
|
|
|
``` console
|
2021-01-14 00:56:23 +01:00
|
|
|
$ nix-shell
|
2017-06-14 16:06:14 +02:00
|
|
|
[nix-shell]$ cabal configure --enable-tests && cabal build && cabal test
|
2016-07-26 01:37:06 +02:00
|
|
|
```
|
2016-12-19 23:53:44 +01:00
|
|
|
|
2016-08-02 23:37:56 +02:00
|
|
|
Using the Library
|
|
|
|
-----------------
|
|
|
|
|
2016-12-19 23:53:44 +01:00
|
|
|
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.
|