[Help] How to initialize project with dune

Hello. Sorry, there wasn’t a “Help” category so I posted this here. How do I initialize a project in the current directory and generate the files in the current directory without creating a parent directory? I’ve tried dune init proj my_project I looked at dune init project --help and it didn’t look like there was an option for this.

Thanks!

1 Like

You need only create a file named dune-project in your current directory, containing

(lang dune 3.10)

(assuming you are using Dune 3.10).

That’s it! Next, you can add dune files as needed wherever you have things that you want to build (executables, libraries).

Cheers,
Nicolas

1 Like

There’s also a minimal example on the dune landing page https://dune.build/

2 Likes