Web and Networking
- httpaf: Recommended. A high performance web server written in OCaml. Compatible with Async and Lwt.
- h2: High performance http2 server.
- cohttp: An alternative, lightweight HTTP server.
- Opium: Sinatra like web toolkit for OCaml. Uses cohttp.
- httpkit: Experimental. High level HTTP server/client creation. Uses httpaf. Currently requires an OPAM pin to install.
- ocamlapi: Routing with ppx support. Uses cohttp and Core.
- routes: Typed routing with combinators.
OCaml currently does not support HTTP2. However, work is ongoing and the following parts exist:
- h2: HTTP/2 framing. WIP: encoding/decoding of binary streams into HTTP/2 frames using Angstrom and Faraday. Parsing is more or less completed, needs help with serialization using Faraday + adding automated testing.
- hpack: Header compression algorithm required for HTTP2.
- Ocsigen Eliom: a full-featured multi-tier framework, for developing multi-platform Web and mobile apps as 100% OCaml distributed applications. It can also be used for more traditional Web or mobile apps. Eliom lets you write client and server code in OCaml, where both are typechecked against each other, the client being compiled to JS and the backend to OCaml.
- webmachine – A REST toolkit for OCaml. OCaml webmachine is a layer on top of cohttp that implements a state-machine-based HTTP request processor. It’s particularly well-suited for writing RESTful APIs. As the name suggests, this is an OCaml port of the webmachine project.
- OCaml-graphql-server: A GraphQL server library. GraphQL is a regimented approach to data management in web apps.
- ppx_graphql: Generate type-safe code for graphql queries from GraphQL schema and queries.
- Cumulus : Hackernews-like website with the OCaml framework Ocsigen (demo is currently down).
- Prose : A Google-docs-like collaborative editing application written using Eliom/Ocsigen. See the demo here
- Canopy: A blogging MirageOS unikernel based on git. Can be compiled to Unix as well.
- commonjs_of_ocaml : Easily import and export CommonJS modules from a js_of_ocaml project.
The browser’s Document Object Model is very expensive to manipulate, and some frameworks work on making DOM manipulation more efficient.
- vdom: A version of virtual DOM manipulation that goes well with Ocsigen.
- incr_dom: Jane Street’s version of virtual DOM, backed by the very powerful Incremental library.
build valid html using combinators. Leverages OCaml’s type system.
PPX syntax extension to translate html/xml syntax into
- tyxml-ppx: PPX syntax extension to translate html/xml syntax into
- omd: convert Markdown to html.
- ocurl : OCaml bindings to libcurl.
- ocaml-dns – A pure OCaml implementation of the DNS protocol.
- udns: An opinionated DNS server library written in pure OCaml.
- fluent-logger : A fluentd logger for OCaml.
- charrua-unix - charrua-unix is a Unix DHCP daemon based on charrua-core
- COW – Caml on the Web (COW) is a set of parsers and syntax extensions to let you manipulate HTML, CSS, XML, JSON and Markdown directly from OCaml code.
- Ocamlnet : has many relevant networking libraries:
- ocaml-uri – RFC3986 URI parsing library.
- Syndic – RSS and Atom feed parsing
- ocaml-mustache – mustache.js logic-less templates in OCaml.
- atdjs – atd code generator for OCaml/js_of_ocaml.
- jingoo – OCaml template engine almost compatible with jinja2.
- dispatch – Path-based dispatching for client- and server-side applications.
- Lambda Soup - Functional HTML scraping and manipulation with CSS selectors, à la Python’s Beautiful Soup.
- Markup.ml - Error-recovering streaming HTML5 and XML parsers, serializers.
- slacko : command line interface to Slack.
- dis.ml: API for Discord servers. Uses Async and Core.
- irc-client: Client and API for IRC.
- ocaml-orc: IRC library.
Low Level Protocols
- mirage-tcpip: Part of mirage OS – a complete implementation of the TCP/IP stack in OCaml.