# Lwt.ppx + mirageOS: how does it work?

**URL:** <https://discuss.ocaml.org/t/lwt-ppx-mirageos-how-does-it-work/2662>\
**Category:** Learning\
**Tags:** ppx, mirageos\
**Created:** [October 3, 2018, 1:01am UTC](https://discuss.ocaml.org/t/lwt-ppx-mirageos-how-does-it-work/2662 "2018-10-03T01:01:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kai](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@Kai](https://discuss.ocaml.org/u/Kai)\
**Post date:** [October 3, 2018, 1:01am UTC](https://discuss.ocaml.org/t/lwt-ppx-mirageos-how-does-it-work/2662/1 "2018-10-03T01:01:22Z")

</div>

Apologies if this is an FAQ. I’d like to use Lwt.ppx to write mirageOS unikernel.ml files. How can I convince mirage of the need to include lwt\_ppx in its ocamlfind incantation without messing with generated files after `mirage configure -t macos && make depend` and before `make`?

---

<div class="post-metadata">

**Author:** ![Kai](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@Kai](https://discuss.ocaml.org/u/Kai)\
**Post date:** [October 3, 2018, 2:14am UTC](https://discuss.ocaml.org/t/lwt-ppx-mirageos-how-does-it-work/2662/2 "2018-10-03T02:14:34Z")

</div>

Ok, found it thanks to a helpful colleague. In config.ml, I added `~packages:[package "lwt_ppx"]`to the arguments of `foreign` in the definition of `main` so config.ml now is this:

```
open Mirage

let main =
  foreign "Unikernel.Main"
    ~packages:[package "lwt_ppx"]
    (console @-> job)

let () =
  register "pingpong" [main $ default_console]
```
