# Does Dune have any concept like "dev dependencies"?

**URL:** <https://discuss.ocaml.org/t/does-dune-have-any-concept-like-dev-dependencies/8403>\
**Category:** Ecosystem\
**Created:** [September 1, 2021, 4:47pm UTC](https://discuss.ocaml.org/t/does-dune-have-any-concept-like-dev-dependencies/8403 "2021-09-01T16:47:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anentropic](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/anentropic/32/2509_2.png) [@anentropic](https://discuss.ocaml.org/u/anentropic)\
**Post date:** [September 1, 2021, 4:47pm UTC](https://discuss.ocaml.org/t/does-dune-have-any-concept-like-dev-dependencies/8403/1 "2021-09-01T16:47:29Z")

</div>

Other systems I’ve used in the past have a concept of something like “dev dependencies” which are things like dependencies only needed for running the test suite.

i.e. distinct from the main dependencies, which would be only the minimum deps needed by end users of the library when installing it from opam.

Does Dune have something like that?

I found the `depopts` stanza but it’s not really explained and from [this thread](https://discuss.ocaml.org/t/example-of-how-to-use-depopts-with-dune/5112/2) seems used for different purpose.

---

<div class="post-metadata">

**Author:** ![anentropic](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/anentropic/32/2509_2.png) [@anentropic](https://discuss.ocaml.org/u/anentropic)\
**Post date:** [September 1, 2021, 4:53pm UTC](https://discuss.ocaml.org/t/does-dune-have-any-concept-like-dev-dependencies/8403/2 "2021-09-01T16:53:05Z")

</div>

Oh, I think I found it…

I’d temporarily forgotten that what I am looking for is really an opam feature, and my `dune-project` is auto-generating the opam file

So we have [opam - new opam features: more expressive dependencies](https://opam.ocaml.org/blog/opam-extended-dependencies/#Dependency-flags)

and in dune: [OPAM integration — dune documentation](https://dune.readthedocs.io/en/stable/opam.html#generating-opam-files)

i.e. I can add `:with-test` to any of my deps in `dune-project`
