View on GitHub

OCamlverse

Documenting everything about OCaml

Edit

Web, Networking and Cloud Computing

Articles

HTTP Servers

  • dream: Tidy, feature complete web framework. Supports http and http2.
  • Opium: Sinatra like micro-framework web toolkit for OCaml.
  • ocamlapi: Routing with ppx support. Uses cohttp and Core.
  • http_async: Fast HTTP/1.1 server implementation for Async. Supports both regular async TCP connections and encrypted connections via async_ssl.
  • tiny httpd: Simple HTTP server like python’s SimpleHTTPServer, for serving files.
  • routes: Typed bidirectional routing utility with combinators. Could be useful as part of creating a server.

Web Frameworks

  • dream: Tidy, feature complete web framework. Supports http and http2.
  • nightmare: Set of useful components to use with Dream.
  • hc: Lightweight framework for web applications using server processing and the fetch interface.
  • 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.
  • Sihl: A modular web framework.
  • Morph: Lightweight web framework for OCaml and Reason. docs.
  • re-web: experimental. A type-safe web framework. Currently requires esy to build.
  • webmachine: A REST toolkit for OCaml. Implements a state-machine-based HTTP request processor that is well-suited for writing RESTful APIs. Uses co-http.
  • 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.
  • OCaml On Ice: A web framework in the style of Ruby on Rails, built on top of Opium. It is designed for building REST APIs.
  • Finch: Static site generator using markdown, with a server-side renderer.
  • Naboris: An light OCaml/Reason-based web framework.
  • sopault: a static website generator that exploits the fact that well-formed HTML is machine readable and transformable.
  • Brr: A toolkit for interfacing js_of_ocaml with common browser APIs. Also includes experimental FRP support via Note.

Web Apps

  • Muhokama: Forum software written on top of Dream.
  • 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.
  • Canopy: A blogging MirageOS unikernel based on git. Can be compiled to Unix as well.

Low-Level HTTP Protocol

  • h2: High performance http2 implementation.
  • httpaf: A high performance HTTP implementation written in OCaml. Compatible with Async and Lwt.
  • cohttp: Older, slower implementation of HTTP supporting only HTTP/1.x.

HTTP Clients

  • piaf: An HTTP client that supports both HTTP/1.x and HTTP/2, and with better cross-platform support for SSL.
  • http-lwt-client: A simple HTTP client with emphasis on minimal dependencies.
  • cohttp: A mature, lightweight HTTP server and client that currently only supports HTTP/1.x.
  • fetch: Experimental. Aims to provide a common interface, following the fetch specification, over different HTTP and Promise implementations. Currently only supports piaf and lwt, but also plans to support BuckleScript in the near future.
  • Curly: Wrapper around the curl command for applications that want to create simple HTTP requests

Ocaml to Javascript

  • js_of_ocaml: Compiles OCaml bytecode to Javascript. This makes it possible to run OCaml programs in a browser, while sticking to the OCaml paradigms and ecosystem.
    • commonjs_of_ocaml : Easily import and export CommonJS modules from a js_of_ocaml project.
  • ReScript: A fork of an older version of the OCaml compiler with its own opinionated syntax that compiles to JavaScript directly, prioritizing readability of JavaScript and compatibiltiy with the NPM/JavaScript ecosystem over compatibility with the OCaml ecosystem.
  • Melange: A fork of the ReScript compiler with the aim to integrate better with the OCaml ecosystem, in particular dune and opam, and keep up-to-date with new releases of the OCaml compiler.

Virtual DOM

The browser’s Document Object Model is very expensive to manipulate, and some frameworks work on making DOM manipulation more efficient.

  • ocaml-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.

Protocol Libraries

  • tyxml: build valid html using combinators. Leverages OCaml’s type system.
    • tyxml-ppx: PPX syntax extension to translate html/xml syntax into tyxml function calls.
  • omd: convert Markdown to html.
  • ocurl: OCaml bindings to libcurl.
  • ocaml-dns: A pure OCaml implementation of the DNS protocol. Part of Mirage.
  • udns: An opinionated DNS server library written in pure OCaml.
  • oidc: Library for OpenID Connect.
  • fluent-logger: A fluentd logger for OCaml.
  • charrua-unix: A Unix DHCP daemon based on charrua-core
  • COW: Caml on the Web (COW) is a set of parsers and syntax extensions to manipulate HTML, CSS, XML, JSON and Markdown directly from OCaml code.
  • JOSE: Library for JOSE (JSON Object Signing and Encryption) support.
  • Cookie: Library for working with web cookies.
  • Ocamlnet: An older, but battle-tested suite of advanced networking libraries. Includes many components, such as ones allowing for shared-memory multi-processing, as well as
  • letters: High-level library for creating and writing emails. Uses mrmime and lwt.
  • mrmime: High performance email parsing/generation library.
  • ocaml-uri: RFC3986 URI parsing library.
  • Goji: An OCaml bindings generator for JavaScript libraries.
  • Syndic: RSS and Atom feed parsing
  • ocaml-mustache: mustache.js logic-less templates in OCaml.
  • atdjs: atd code generator for OCaml or 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, similar to Python’s Beautiful Soup.
  • Markup.ml: Error-recovering streaming HTML5 and XML parsers, serializers.
  • gen_js_api: Helps simplify the creation of OCaml bindings for Javascript libraries in js_of_ocaml.
  • AMQP-client: AMQP client library written in OCaml. Supports RabbitMQ, and both lwt and Async.

Chat Protocols

  • 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.
  • proofchat: A multithreaded TCP client/server chat application written in Coq and extracted to OCaml

Low Level Protocols

  • mirage-tcpip: Part of Mirage. A complete implementation of the TCP/IP stack in OCaml.
  • ocaml-xsk: Bindings to AF_XDP of libbpf. These provide high-performance packet management on Linux, bypassing the kernel.