Skip to content

Add tutorial: Dune Project Structure#3582

Open
cuihtlauac wants to merge 2 commits into
mainfrom
tutorial-dune-structure
Open

Add tutorial: Dune Project Structure#3582
cuihtlauac wants to merge 2 commits into
mainfrom
tutorial-dune-structure

Conversation

@cuihtlauac
Copy link
Copy Markdown
Collaborator

Summary

  • New tutorial data/tutorials/platform/0_04_dune_project_structure.md (~250 lines)
  • Explains the practical "how do files, modules, and dune stanzas fit together" question
  • Covers: file→module mapping, dune-project vs dune files, library/executable/test stanzas, wrapping, typical layout, common tasks
  • Key insight: (depends ...) in dune-project is for the package manager, (libraries ...) in dune files is for the compiler — both must be updated
  • Incorporates practical knowledge from Dune training material (content hashes, dependency inference, rule scoping, module conflicts)
  • Adds cross-reference from bootstrapping-a-dune-project

Test plan

  • make build succeeds
  • Review rendered page at /docs/dune-project-structure
  • Cross-reference from /docs/bootstrapping-a-dune-project works

🤖 Generated with Claude Code

cuihtlauac and others added 2 commits March 26, 2026 09:59
New tutorial explaining how files, modules, and dune stanzas fit
together in an OCaml project:

- File-to-module mapping (foo.ml → Foo, foo.mli as interface)
- dune-project vs dune files: (depends ...) vs (libraries ...)
- Library stanzas: wrapping, public/internal, manual wrappers
- Executable and test stanzas
- Typical project layout with a worked example
- How dune builds: content hashes, dependency inference, rule scoping
- Common tasks: adding modules, dependencies, libraries, PPX
- Troubleshooting: unbound module, conflicting modules, etc.

Also adds "dune-project-structure" to bootstrapping-a-dune-project's
recommended next tutorials.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- MD014: Remove `$ ` prefix from shell code block without output
- MD036: Convert bold pseudo-headings to ### headings in Troubleshooting
- MD040: Add `text` language tag to bare code blocks (directory layouts, error output)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant