# \#dune

**URL:** https://discuss.ocaml.org/tag/dune/180.md

[Latest](https://discuss.ocaml.org/latest.md) · [Categories](https://discuss.ocaml.org/categories.md) · [Tags](https://discuss.ocaml.org/tags.md)

---

## [Do you want to go on a camel-ride to explore the world of OCaml? ](https://discuss.ocaml.org/t/do-you-want-to-go-on-a-camel-ride-to-explore-the-world-of-ocaml/18653)

<div class="topic-metadata">

**Author:** [@Jyoti\_Bhogal](https://discuss.ocaml.org/u/Jyoti_Bhogal)\
**Replies:** 0\
**Last updated:** [October 25, 2026, 5:09pm UTC](https://discuss.ocaml.org/t/do-you-want-to-go-on-a-camel-ride-to-explore-the-world-of-ocaml/18653 "2026-10-25T17:09:44Z")

</div>

Photo by Hongbin on Unsplash Have you ever opened a new code repository and wondered where to begin? What do all these folders and files mean? Where should I look first? And how do I start contributing? I had simila…

---

## [Checking dune files for semantic errors](https://discuss.ocaml.org/t/checking-dune-files-for-semantic-errors/18572)

<div class="topic-metadata">

**Author:** [@amaro](https://discuss.ocaml.org/u/amaro)\
**Replies:** 0\
**Last updated:** [September 30, 2026, 10:09pm UTC](https://discuss.ocaml.org/t/checking-dune-files-for-semantic-errors/18572 "2026-09-30T22:09:34Z")

</div>

Recently I’ve found two kinds of errors in one of our dune files: A dirs stanza containing directories that do not exist, e.g. (dirs foo bar) when only foo exists. A dune file inside a directory absent from a dirs stan…

---

## [Shellcheck for Cram tests](https://discuss.ocaml.org/t/shellcheck-for-cram-tests/18551)

<div class="topic-metadata">

**Author:** [@amaro](https://discuss.ocaml.org/u/amaro)\
**Replies:** 1\
**Last updated:** [September 22, 2026, 5:58pm UTC](https://discuss.ocaml.org/t/shellcheck-for-cram-tests/18551 "2026-09-22T17:58:44Z")

</div>

When writing Cram tests, we end up making some mistakes, and using Shellcheck would allow us to avoid some of them. However, the format of run.t files does not currently allow running it “as is”. I tried doing some simp…

---

## [\[Update\] Dune Package Management Support in VSCode](https://discuss.ocaml.org/t/update-dune-package-management-support-in-vscode/18523)

<div class="topic-metadata">

**Author:** [@PizieDust](https://discuss.ocaml.org/u/PizieDust)\
**Replies:** 0\
**Last updated:** [September 10, 2026, 1:03pm UTC](https://discuss.ocaml.org/t/update-dune-package-management-support-in-vscode/18523 "2026-09-10T13:03:21Z")

</div>

We are happy to announce improvements to the OCaml VSCode Extension relating to Dune Package Management (DPM). This update includes several bug fixes and quality-of-life improvements. In this new update: to activate DPM…

---

## [Benchmarking across different commits/branches (with dune?)](https://discuss.ocaml.org/t/benchmarking-across-different-commits-branches-with-dune/16883)

<div class="topic-metadata">

**Author:** [@threepwood](https://discuss.ocaml.org/u/threepwood)\
**Replies:** 1\
**Last updated:** [August 20, 2026, 11:54am UTC](https://discuss.ocaml.org/t/benchmarking-across-different-commits-branches-with-dune/16883 "2026-08-20T11:54:44Z")

</div>

Hi everyone, I was looking into evaluating the performance of some library I’m writing and I was able to write a dune test comparing it to other libraries fairly easily (with the benchmark package). However this requires…

---

## [\[ANN\] ocaml-android reboot!](https://discuss.ocaml.org/t/ann-ocaml-android-reboot/18432)

<div class="topic-metadata">

**Author:** [@toots](https://discuss.ocaml.org/u/toots)\
**Replies:** 1\
**Last updated:** [August 10, 2026, 7:38am UTC](https://discuss.ocaml.org/t/ann-ocaml-android-reboot/18432 "2026-08-10T07:38:09Z")

</div>

Hi all! I have just pushed a full reboot of the Android cross-compiler opam repository! The reboot follows the most recent practices set by the windows counter part and is pretty clean, thanks to the vast improvements …

---

## [Automatic inclusion of a dependency share folder in the install tree?](https://discuss.ocaml.org/t/automatic-inclusion-of-a-dependency-share-folder-in-the-install-tree/18416)

<div class="topic-metadata">

**Author:** [@GirardR1006](https://discuss.ocaml.org/u/GirardR1006)\
**Replies:** 0\
**Last updated:** [August 4, 2026, 10:15pm UTC](https://discuss.ocaml.org/t/automatic-inclusion-of-a-dependency-share-folder-in-the-install-tree/18416 "2026-08-04T22:15:32Z")

</div>

Question Is there a way to include via dune rules a dependency’s share folder in my own project install tree? Or should I vendor those files? Context I am writing a barebone Python API for CAISAR. My idea is to build s…

---

## [\[ANN\] Dune 3.24](https://discuss.ocaml.org/t/ann-dune-3-24/18316)

<div class="topic-metadata">

**Author:** [@shonfeder](https://discuss.ocaml.org/u/shonfeder)\
**Replies:** 7\
**Last updated:** [August 4, 2026, 7:56am UTC](https://discuss.ocaml.org/t/ann-dune-3-24/18316 "2026-08-04T07:56:53Z")

</div>

The Dune team is pleased to announce the release of dune 3.24.0. Highlights include the following: Dune package management now uses the relocatable compiler by default, for all supported compiler versions. This bring…

---

## [Dune Package Management Updates](https://discuss.ocaml.org/t/dune-package-management-updates/18023)

<div class="topic-metadata">

**Author:** [@shonfeder](https://discuss.ocaml.org/u/shonfeder)\
**Replies:** 1\
**Last updated:** [July 19, 2026, 4:29am UTC](https://discuss.ocaml.org/t/dune-package-management-updates/18023 "2026-07-19T04:29:35Z")

</div>

Hello! The Tarides team is writing to share updates on Dune package management. Context Dune package management aims to improve some developer workflows by simplifying the use of opam dependencies in projects built with…

---

## [Dune build @doc with menhir generated files](https://discuss.ocaml.org/t/dune-build-doc-with-menhir-generated-files/18337)

<div class="topic-metadata">

**Author:** [@Nyavlys](https://discuss.ocaml.org/u/Nyavlys)\
**Replies:** 3\
**Last updated:** [July 14, 2026, 9:47am UTC](https://discuss.ocaml.org/t/dune-build-doc-with-menhir-generated-files/18337 "2026-07-14T09:47:14Z")

</div>

Hi, After moving from menhir.20250912 to more recent versions, I have the following error message from odocwhen running dune build @doc Error: While resolving the expansion of include at File "src/scripting/tableParser…

---

## [\[ANN\] Dune 3.23](https://discuss.ocaml.org/t/ann-dune-3-23/18055)

<div class="topic-metadata">

**Author:** [@shonfeder](https://discuss.ocaml.org/u/shonfeder)\
**Replies:** 4\
**Last updated:** [May 19, 2026, 6:09pm UTC](https://discuss.ocaml.org/t/ann-dune-3-23/18055 "2026-05-19T18:09:51Z")

</div>

The Dune team is pleased to announce the release of dune 3.23.0. Along with many other fixes and improvements, some highlights include: Add support for c\_library\_flags in foreign\_stubs (#13484, @madroach) Many improve…

---

## [Dune, ocamldebug, foreign\_stubs](https://discuss.ocaml.org/t/dune-ocamldebug-foreign-stubs/18089)

<div class="topic-metadata">

**Author:** [@Daiwen](https://discuss.ocaml.org/u/Daiwen)\
**Replies:** 8\
**Last updated:** [May 13, 2026, 11:42am UTC](https://discuss.ocaml.org/t/dune-ocamldebug-foreign-stubs/18089 "2026-05-13T11:42:42Z")

</div>

I stumbled upon a bug in a compiler written in ocaml, namely the haxe compiler. I figured I could try to fix it, or at least use ocamldebug to see how I could work around it. I compiled from source and found an annotat…

---

## [Rocq-released repository with dune package management](https://discuss.ocaml.org/t/rocq-released-repository-with-dune-package-management/18054)

<div class="topic-metadata">

**Author:** [@shilangyu](https://discuss.ocaml.org/u/shilangyu)\
**Replies:** 3\
**Last updated:** [May 6, 2026, 1:32pm UTC](https://discuss.ocaml.org/t/rocq-released-repository-with-dune-package-management/18054 "2026-05-06T13:32:24Z")

</div>

I have Rocq projects that are managed by opam+dune. The standard flow is to: Add the Rocq opam repository: opam repo add rocq-released https://rocq-prover.org/opam/released Run opam install . This works great. But I w…

---

## [Bug of download Dune](https://discuss.ocaml.org/t/bug-of-download-dune/18025)

<div class="topic-metadata">

**Author:** [@Olagoora](https://discuss.ocaml.org/u/Olagoora)\
**Replies:** 4\
**Last updated:** [April 30, 2026, 10:55pm UTC](https://discuss.ocaml.org/t/bug-of-download-dune/18025 "2026-04-30T22:55:44Z")

</div>

Bonjours. Hello everyone I’m having trouble installing Dune on Windows. Here’s my terminal output for some information. PS C:\\Users\\Utilisateur\\Scripts-Studio-Code\\\> opam init -y …

---

## [Dune Cram tests: preloading aliases/scripts](https://discuss.ocaml.org/t/dune-cram-tests-preloading-aliases-scripts/17610)

<div class="topic-metadata">

**Author:** [@amaro](https://discuss.ocaml.org/u/amaro)\
**Replies:** 5\
**Last updated:** [April 29, 2026, 1:55pm UTC](https://discuss.ocaml.org/t/dune-cram-tests-preloading-aliases-scripts/17610 "2026-04-29T13:55:05Z")

</div>

We are considering large-scale adoption of Cram tests, but we are missing some engineering features that are needed to ensure we don’t have to manually update hundreds of files when we need to apply some global changes. …

---

## [Experience Report: Refining Dune’s Dependency Graph](https://discuss.ocaml.org/t/experience-report-refining-dune-s-dependency-graph/18002)

<div class="topic-metadata">

**Author:** [@robinbb](https://discuss.ocaml.org/u/robinbb)\
**Replies:** 8\
**Last updated:** [April 22, 2026, 4:31pm UTC](https://discuss.ocaml.org/t/experience-report-refining-dune-s-dependency-graph/18002 "2026-04-22T16:31:00Z")

</div>

Refining Dune’s Dependency Graph: Per-Module Library Filtering I’ve been working on improving Dune’s inter-library dependency tracking, and wanted to share the experience — both the technical details and what it’s like a…

---

## [Closing Old Bugs With Tests: A Dune Contribution Story](https://discuss.ocaml.org/t/closing-old-bugs-with-tests-a-dune-contribution-story/18008)

<div class="topic-metadata">

**Author:** [@robinbb](https://discuss.ocaml.org/u/robinbb)\
**Replies:** 0\
**Last updated:** [April 21, 2026, 10:01pm UTC](https://discuss.ocaml.org/t/closing-old-bugs-with-tests-a-dune-contribution-story/18008 "2026-04-21T22:01:29Z")

</div>

I recently started contributing to Dune with no prior familiarity with the code base. One thing I found rewarding was closing old issues — some filed as far back as 2018 — and I wanted to share the approach I used. The …

---

## [\[ANN\] Dune 3.22](https://discuss.ocaml.org/t/ann-dune-3-22/17912)

<div class="topic-metadata">

**Author:** [@shonfeder](https://discuss.ocaml.org/u/shonfeder)\
**Replies:** 2\
**Last updated:** [April 14, 2026, 5:11pm UTC](https://discuss.ocaml.org/t/ann-dune-3-22/17912 "2026-04-14T17:11:37Z")

</div>

The Dune team is pleased to announce the release of dune 3.22.0. In addition to many fixes and small improvements, notable highlights of this release include: Fixes to the dune cache on Windows, thanks to @Nevor in oc…

---

## [Blog: OCaml documentation as markdown](https://discuss.ocaml.org/t/blog-ocaml-documentation-as-markdown/17951)

<div class="topic-metadata">

**Author:** [@davesnx](https://discuss.ocaml.org/u/davesnx)\
**Replies:** 2\
**Last updated:** [April 14, 2026, 11:58am UTC](https://discuss.ocaml.org/t/blog-ocaml-documentation-as-markdown/17951 "2026-04-14T11:58:57Z")

</div>

I published a blog post about odoc’s markdown backend and how I used it to make the melange.re documentation better, hope you like it: Thanks to @jonludlam @rgrinberg and @Alizter for reviewing the work that made it p…

---

## [How can my code know my program's version?](https://discuss.ocaml.org/t/how-can-my-code-know-my-programs-version/17980)

<div class="topic-metadata">

**Author:** [@user1](https://discuss.ocaml.org/u/user1)\
**Replies:** 9\
**Last updated:** [April 13, 2026, 11:18am UTC](https://discuss.ocaml.org/t/how-can-my-code-know-my-programs-version/17980 "2026-04-13T11:18:06Z")

</div>

In an example in the Cmdliner tutorial tutorial (cmdliner.tutorial) I see the promising line Cmd.make (Cmd.info "TODO" ~version:"%%VERSION%%") @@ ... so I guess there should be some kind of preprocessing to replace…

---

## [Dune, odoc and "failed to resolve reference"](https://discuss.ocaml.org/t/dune-odoc-and-failed-to-resolve-reference/17969)

<div class="topic-metadata">

**Author:** [@louisono](https://discuss.ocaml.org/u/louisono)\
**Replies:** 7\
**Last updated:** [April 12, 2026, 11:42am UTC](https://discuss.ocaml.org/t/dune-odoc-and-failed-to-resolve-reference/17969 "2026-04-12T11:42:21Z")

</div>

Hi, I’m trying to write some documentation for a small tool (i.e. an executable) and I’m encountering an issue when trying to link a module that’s part of my tool’s library: I get the error message Failed to resolve refe…

---

## [\[ANN\] Dune 3.21.0](https://discuss.ocaml.org/t/ann-dune-3-21-0/17700)

<div class="topic-metadata">

**Author:** [@shonfeder](https://discuss.ocaml.org/u/shonfeder)\
**Replies:** 1\
**Last updated:** [February 24, 2026, 2:52am UTC](https://discuss.ocaml.org/t/ann-dune-3-21-0/17700 "2026-02-24T02:52:23Z")

</div>

The Dune team is pleased to announce the release of dune 3.21.0. This is a large release, including dozens of fixes, improvements, and additions, thanks to many contributors. See the full changelog for all changes and c…

---

## [Dune portable replacement for 'grep' / 'sed'](https://discuss.ocaml.org/t/dune-portable-replacement-for-grep-sed/17815)

<div class="topic-metadata">

**Author:** [@amaro](https://discuss.ocaml.org/u/amaro)\
**Replies:** 8\
**Last updated:** [February 18, 2026, 7:50am UTC](https://discuss.ocaml.org/t/dune-portable-replacement-for-grep-sed/17815 "2026-02-18T07:50:41Z")

</div>

I just realized that this dune action fails on Windows, where grep and sed are not available by default: (rule (targets version.ml) (deps foo.opam) (action (system "grep ^version foo.opam | sed -e 's/version:/let …

---

## [\`dune test\` and test-only dependencies](https://discuss.ocaml.org/t/dune-test-and-test-only-dependencies/17786)

<div class="topic-metadata">

**Author:** [@anentropic](https://discuss.ocaml.org/u/anentropic)\
**Replies:** 5\
**Last updated:** [February 11, 2026, 9:52pm UTC](https://discuss.ocaml.org/t/dune-test-and-test-only-dependencies/17786 "2026-02-11T21:52:13Z")

</div>

Does anyone have a solution for this scenario: I am building an OCaml library, nothing exciting. I have some tests for the library, the tests use some test-only deps (e.g. Popper) I want to be able to: install just …

---

## [How do you debug your dune/dune-packages/\*.opam?](https://discuss.ocaml.org/t/how-do-you-debug-your-dune-dune-packages-opam/17773)

<div class="topic-metadata">

**Author:** [@Yoric](https://discuss.ocaml.org/u/Yoric)\
**Replies:** 7\
**Last updated:** [February 6, 2026, 10:33pm UTC](https://discuss.ocaml.org/t/how-do-you-debug-your-dune-dune-packages-opam/17773 "2026-02-06T22:33:17Z")

</div>

In the project I’m working on, since my latest rebase, I get a Missing dependency: - deps-of-foo → bin\_prot \< v0.12.0 no matching version which is fairly weird, because I’ve explicitly specified bin\_prot = 0.1…

---

## [Dune: rule to generate a file that may be present in the source tree](https://discuss.ocaml.org/t/dune-rule-to-generate-a-file-that-may-be-present-in-the-source-tree/17778)

<div class="topic-metadata">

**Author:** [@adrien](https://discuss.ocaml.org/u/adrien)\
**Replies:** 2\
**Last updated:** [February 6, 2026, 3:06pm UTC](https://discuss.ocaml.org/t/dune-rule-to-generate-a-file-that-may-be-present-in-the-source-tree/17778 "2026-02-06T15:06:22Z")

</div>

Hi, I have a file that I want to store in compressed form in git but I also need it uncompressed when working with it, plus I want to store in dune how to create the compressed version. This means I have a rule to gene…

---

## [Dune, cmake and -j](https://discuss.ocaml.org/t/dune-cmake-and-j/17768)

<div class="topic-metadata">

**Author:** [@tbrk](https://discuss.ocaml.org/u/tbrk)\
**Replies:** 5\
**Last updated:** [February 6, 2026, 10:28am UTC](https://discuss.ocaml.org/t/dune-cmake-and-j/17768 "2026-02-06T10:28:07Z")

</div>

My project contains a vendored library which is built using cmake via the following stanza in a dune file. (subdir libortools-build (rule (deps (source\_tree ../libortools)) (targets (dir build)) (action (p…

---

## [Large repository of real dune files, to grep for examples](https://discuss.ocaml.org/t/large-repository-of-real-dune-files-to-grep-for-examples/17747)

<div class="topic-metadata">

**Author:** [@amaro](https://discuss.ocaml.org/u/amaro)\
**Replies:** 12\
**Last updated:** [February 5, 2026, 9:32am UTC](https://discuss.ocaml.org/t/large-repository-of-real-dune-files-to-grep-for-examples/17747 "2026-02-05T09:32:16Z")

</div>

Is there a place in which a large number of real dune files are easily accessible, so that one can grep them for examples? Namely for details which are not necessarily written out in the docs. For instance, opam-reposit…

---

## [Foreign\_archives: no static libraries, .dylib on mac](https://discuss.ocaml.org/t/foreign-archives-no-static-libraries-dylib-on-mac/17669)

<div class="topic-metadata">

**Author:** [@tbrk](https://discuss.ocaml.org/u/tbrk)\
**Replies:** 9\
**Last updated:** [February 2, 2026, 10:02pm UTC](https://discuss.ocaml.org/t/foreign-archives-no-static-libraries-dylib-on-mac/17669 "2026-02-02T22:02:16Z")

</div>

I am trying to use “Foreign Build Sandboxing” to include a “vendor” library in an OCaml interface; and also hopefully to better understand dune. Compiling the vendor library with cmake on macOS gives three files: libort…

---

## [How to preserve output color from dune test?](https://discuss.ocaml.org/t/how-to-preserve-output-color-from-dune-test/17756)

<div class="topic-metadata">

**Author:** [@eureka-cpu](https://discuss.ocaml.org/u/eureka-cpu)\
**Replies:** 2\
**Last updated:** [January 31, 2026, 7:42pm UTC](https://discuss.ocaml.org/t/how-to-preserve-output-color-from-dune-test/17756 "2026-01-31T19:42:33Z")

</div>

Howdy, I’m using build to invoke rustc to create a bin and run rust tests and it’s pretty sweet, and color output works fine on my terminal except when I do it in a nix derivation, for some reason it doesn’t want to prin…

[Next page](https://discuss.ocaml.org/tag/dune/180.md?match_all_tags=true&page=1&tags%5B%5D=dune)
