this repo has no description
OCaml 98.5%
Dune 0.1%
Other 1.5%
46 2 1

Clone this repository

https://tangled.org/anil.recoil.org/ocaml-jmap
git@git.recoil.org:anil.recoil.org/ocaml-jmap

For self-hosted knots, clone URLs may differ based on your setup.

README.md

JMAP OCaml Libraries#

This project implements OCaml libraries for the JMAP protocol, following the specifications in RFC 8620 (Core) and RFC 8621 (Mail).

Project Structure#

The code is organized into three main libraries:

  1. jmap - Core JMAP protocol (RFC 8620)

    • Basic data types
    • Error handling
    • Wire protocol
    • Session handling
    • Standard methods (get, set, changes, query)
    • Binary data handling
    • Push notifications
  2. jmap-unix - Unix-specific implementation of JMAP

    • HTTP connections to JMAP endpoints
    • Authentication
    • Session discovery
    • Request/response handling
    • Blob upload/download
    • Unix-specific I/O
  3. jmap-email - JMAP Mail extension (RFC 8621)

    • Email specific types
    • Mailbox handling
    • Thread management
    • Search snippet functionality
    • Identity management
    • Email submission
    • Vacation response

Usage#

The libraries are designed to be used together. For example:

(* Using the core JMAP protocol library *)
open Jmap
open Jmap.Types
open Jmap.Wire

(* Using the Unix implementation *)
open Jmap_unix

(* Using the JMAP Email extension library *)
open Jmap_email
open Jmap_email.Types

(* Example: Connecting to a JMAP server *)
let connect_to_server () =
  let credentials = Jmap_unix.Basic("username", "password") in
  let (ctx, session) = Jmap_unix.quick_connect ~host:"jmap.example.com" ~username:"user" ~password:"pass" in
  ...

Building#

# Build
opam exec -- dune build @check

# Generate documentation
opam exec -- dune build @doc

References#