Skip to content

Conversation

@Sudha247
Copy link
Collaborator

@Sudha247 Sudha247 commented Nov 24, 2025

Closes #11652

Adds a tutorial for setting up an OxCaml project with Dune package management.

I contemplated where this should go, and thought this might be a good place, after all. It shows (1) how to setup an OxCaml project, (2) servers as a live example of the previous two tutorials.

#12111 is a more comprehensive tutorial about parametric libraries and OxCaml, but it doesn't specifically cover the topic of Dune package management with OxCaml. I recently ported an OxCaml project to build with Dune package management and the configuration was not as straightforward as I expected, and thought a tutorial on this topic might be useful.

This takes some material from https://github.com/gridbugs/hello-oxcaml (thanks @gridbugs!).

@Alizter
Copy link
Collaborator

Alizter commented Nov 24, 2025

Here are some screenshots:

image

I think having these drop-down code excerpts is kind of pointless. Perhaps it would be better just to have the code inline like we do elsewhere in the docs.

@Alizter
Copy link
Collaborator

Alizter commented Nov 24, 2025

The main title doesn't need to say Example: probably.

Copy link
Member

@shonfeder shonfeder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad to have this included!

Signed-off-by: Sudha Parimala <sudharg247@gmail.com>
Signed-off-by: Sudha Parimala <sudharg247@gmail.com>
# Setting up an OxCaml project

As an example of how to add custom repositories and pin dependencies in projects
using `dune pkg`, let's look at setting up a basic OxCaml project.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should be consistent with how we refer to dune package management in the docs. My preference would be to always write "Dune Package Management", or less formally to talk about "Dune's package management mechanism". The risk of referring to dune package management as dune pkg is that it looks like a command, and while that happens to be a command group for doing some package management tasks, conflating that with dune package management is incorrect (e.g. users of autolocking never need to run commands under dune pkg).

@Alizter
Copy link
Collaborator

Alizter commented Nov 26, 2025

At some point these how-to's turned into markdown rather than being rst documents which is slightly confusing. In rst we have syntax highlighting for dune files etc. Does anybody remember why markdown was chosen for these?

I would suggest writing this tutorial in rst, not only for consistency, but because it will play better with cross-linking that we have elsewhere in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[pkg] Build OxCaml with Dune package management

4 participants