# Ppx\_deriving runtime files

**URL:** <https://discuss.ocaml.org/t/ppx-deriving-runtime-files/1602>\
**Category:** Learning\
**Tags:** ppx\_deriving\
**Created:** [February 21, 2018, 8:50am UTC](https://discuss.ocaml.org/t/ppx-deriving-runtime-files/1602 "2018-02-21T08:50:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ifazk](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/ifazk/32/836_2.png) [@ifazk](https://discuss.ocaml.org/u/ifazk)\
**Post date:** [February 21, 2018, 8:50am UTC](https://discuss.ocaml.org/t/ppx-deriving-runtime-files/1602/1 "2018-02-21T08:50:54Z")

</div>

I’ve been looking into writing `ppx_deriving` plugins and one thing that keeps popping up are these runtime files.

For example, `ppx_deriving` itself has `src/ppx_deriving_runtime.ml[i]` and `ppx_deriving_yojson` has `src/ppx_deriving_yojson_runtime.ml[i]`.

What do these files do?

---

<div class="post-metadata">

**Author:** ![ifazk](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/ifazk/32/836_2.png) [@ifazk](https://discuss.ocaml.org/u/ifazk)\
**Post date:** [February 22, 2018, 4:55am UTC](https://discuss.ocaml.org/t/ppx-deriving-runtime-files/1602/2 "2018-02-22T04:55:04Z")

</div>

Replying to my own question, but the runtime wraps around builtin types and modules. This way ppx\_deriving is guaranteed to work over builtin types and modules instead of user defined types and values that shadow the builtins.
