Dear fellow OCamlers,
I’m pleased to announce the product of a few months of work: an HTTP/2 implementation written entirely in OCaml: h2.
h2 is based on the concepts in http/af, using Angstrom and Faraday for the parsing and serialization of the HTTP/2 framing layer, respectively. It also preserves the same API as http/af wherever possible, for familiarity reasons. The notable exception is the addition of a
Reqd.push function that implements the HTTP/2 server push functionality.
h2 currently provides a server implementation, as well as runtime implementations for Lwt (UNIX) and Mirage (which I implemented at the last Mirage Hack Retreat in Marrakech).
The repo for h2 is here. The packages are not yet released to OPAM, a task I’m planning to complete in the next few days.
Happy to hear any feedback / answer questions here or in Github issues (https://github.com/anmonteiro/ocaml-h2/issues).