Back to directory

ppx_deriving

ppx_deriving is an OCaml library and syntax-extension framework that generates boilerplate code from type declarations through plugins such as show, eq, ord, enum, iter, map, fold, make, yojson and protobuf.

ppx_deriving

ppx_deriving lets an OCaml type declaration carry a [@@deriving plugin] annotation that triggers code generation for that type, such as printing, equality, ordering, enumeration, iteration, mapping or folding, or serialization to Yojson or Protobuf. It installs via OPAM and integrates with build systems including ocamlbuild and Dune, where Dune's pps directive can link several preprocessors into a single executable to speed up compilation on large projects.

The project has been maintained since 2014, and for new deriving plugins the maintainers now recommend using ppxlib directly, whose Ppxlib.Deriving module offers similar functionality with tighter integration and a nicer API. ppx_deriving itself continues to be maintained so that its existing plugins keep working.

More in Libraries

See all 292
  • OpenDecision

    deepanwadhwa.github.io

    An open-source Python package that answers typed questions about application state or documents using a local natural-language-inference model, returning structured choice, score, yes/no or evidence-relation values instead of free text.

  • TradeCanvas

    bonguynvan.github.io

    A zero-dependency canvas charting engine for building TradingView-style trading charts in JavaScript, with 66 technical indicators, 24 drawing tools, 17 chart types, and real-time streaming.

  • 3d retro graphics

    3d-retro.com

    A free, CC0-licensed library of copy-paste retro 3D and demoscene graphics effects, such as plasma, raytracing, and voxel terrain, runnable as WebGL 1 or plain 2D canvas.