Type-driven code generation for OCaml
ppx_deriving is a library for type-driven code generation in OCaml. It simplifies the process of automatically generating functions based on type declarations through plugins that handle common code generation tasks, including show (pretty-printing), eq and ord (equality and ordering comparisons), enum (integer conversions), iter, map and fold (polymorphic data structure traversal), make (record constructors), and integrations with yojson and protobuf. The library is built for OCaml and integrates with build systems like ocamlbuild and Dune through the ppx (preprocessor extension) mechanism; it was originally released by whitequark in 2014 and is currently sponsored by Evil Martians. Users invoke deriving plugins by attaching `[@@deriving plugin]` annotations to type declarations, with support for customization through options and attributes, and the library provides a runtime module and API for developing custom plugins.