dune icon indicating copy to clipboard operation
dune copied to clipboard

Organizing multiple executables in different directories

Open Alizter opened this issue 11 months ago • 4 comments

Problem

Users often struggle to organise projects with multiple executables in different directories. A common question is: "My project wants to build several executables in different places, how do I do it?"

Solution

We should introduce a howto guide covering the following areas:;

  • Executables in multiple subdirectories
  • How dune and dune-project files are organised in the source tree
  • Sharing library code between executables

A previous attempt in #13142 was kindly submitted by @jrfondren. The guide there focused on dune init while that works for small projects, can be difficult as the project scales. It's probably best we mention the CLI way as little as possible and instead guide the user on the project layout, and the fact that it can be pretty much anything they want.

dune init appears to cause some confusions and sometimes new users end up thinking this is the only way to organise their projects.

Alizter avatar Jan 02 '26 19:01 Alizter

Hi kindly assign this issue to me.

youneedgreg avatar Jan 02 '26 20:01 youneedgreg

@Alizter is this issue still open to take on?

chizy7 avatar Jun 03 '26 03:06 chizy7

@chizy7 Sure. We haven't had any updates on this. I'll reassign it to you.

Alizter avatar Jun 03 '26 08:06 Alizter

@Alizter I have opened a PR

chizy7 avatar Jun 03 '26 19:06 chizy7