RFC Extension for odoc

This extension adds support for citing IETF RFCs (Request for Comments) in odoc documentation. It provides a convenient way to reference internet standards with automatic linking and formatting.

Installation

opam install odoc-rfc-extension

Once installed, the extension is automatically loaded by odoc.

Usage

Use the @rfc tag to cite an RFC:

(** See @rfc 5321 for SMTP details. *)

This creates a formatted citation with a link to the official RFC document.

Examples

IMAP4rev2

SMTP

HTTP/1.1 (original, now obsoleted)

Core Internet Standards

Internet Protocol (IP):

Transmission Control Protocol (TCP):

User Datagram Protocol (UDP):

Domain Name System (DNS):

Modern Web Standards

HTTP Semantics:

HTTP Caching:

JSON Web Token (JWT):

OAuth 2.0:

Email Standards

Internet Message Format:

IMAP IDLE:

IMAP CONDSTORE:

Security Standards

TLS 1.2:

TLS 1.3:

In API Documentation

RFC citations are especially useful in API documentation:

(** Parse an email address according to @rfc 5322.

    @raises Parse_error if the address is malformed *)
val parse : string -> t

How It Works

The extension generates links to the official IETF datatracker:

https://datatracker.ietf.org/doc/html/rfc<number>

The citation is styled with a distinctive appearance to make RFC references easy to identify in documentation.