Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit

Signed-off-by: dianaoigo <>
Co-authored-by: Paul-Elliot <>

Git stats


Failed to load latest commit information.
Latest commit message
Commit time
April 7, 2022 17:20
August 10, 2023 18:54
September 19, 2023 13:38
April 14, 2023 15:23
September 20, 2023 13:28
September 13, 2021 16:15
January 28, 2021 10:32
September 28, 2021 12:19
August 10, 2023 18:54
March 13, 2018 15:56
December 29, 2021 19:55
October 17, 2022 16:22
March 21, 2023 07:57
January 28, 2021 10:32
October 4, 2018 16:15

Ppxlib - Meta-programming for OCaml

ocaml-ci status AppVeyor status

Ppxlib documentation


Ppxlib is the standard library for ppx rewriters and other programs that manipulate the in-memory representation of OCaml programs, a.k.a. the "Parsetree".

It also comes bundled with two ppx rewriters that are commonly used to write tools that manipulate and/or generate Parsetree values: ppxlib.metaquot, which allows constructing Parsetree values using the OCaml syntax directly, and ppxlib.traverse, which provides various ways of automatically traversing values of a given type, in particular allowing to inject a complex structured value into generated code.

For more information about ppxlib and how to use it, please consult the documentation.

What is the relation between ppxlib and other ppx libraries?

The ppx world has a long and storied history, and if you look around, you may find other projects that offer functionalities similar to ppxlib. The following blog post gives a good overview of the various libraries that have been developed over time. At this point, ppxlib is considered the de facto library for writing ppx rewriters.

History of the project

This repository was created by merging several older smaller projects that were developed at Jane Street. See the history for more details.