Skip to content

factisresearch/http2-grpc-haskell

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

haskell-grpc-native

NOTE: This is meqo's fork of http2-grpc-haskell tvh issued a couple of PRs in the repo, which never got accepted. Then sw decided while porting everything to stackage lts-22 to continue the fork.

This organization and repository aim at providing unofficial gRPC implementations for Haskell using native libraries.

Context

Haskell is not an officially supported gRPC language. This repository offers a set of libraries that are compatible with gRPC. A main goal of this initiative is that an intermediate Haskell developper should find the packages reasonably easy to install and easy to tinker with.

Repo organization

The code is split in a number of packages following this three ideas:

  • share a common types packages
  • have server and client-specific packages
  • add a serialization-library specific packages

Usage

We will soon provide examples in this repository. We are currently migrating repositories from scattered places into this organization.

Using proto-lens

First, you'll need both protoc and proto-lens-protoc installed.

In short protoc is a protobuf compiler which calls to external program (in our case proto-lens-protoc) to generate an output (in our case, Haskell code that is part of a library). This process is depicted in the following picture.

build with proto-lens

Note that the version of proto-lens-protoc will determine the version of proto-lens-runtime that you need to import in your project.

Recommendation: you can share the generated-code between server and clients. Hence, we propose to bundle all generated Haskell code in one library that depends on proto-lens-runtime as one types package. Then import this types package in your client/server applications.

Using proto3-wire

Alternatives

There is a low-level API in the official gRPC repository. There also is a more-complete API which uses a binding to the C-library and which is supported by AwakeSecurity.

About

gRPC over HTTP/2 for Haskell, client and server

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Haskell 99.1%
  • Shell 0.9%