This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Directory Structure:
bench- contain benchmarksbin- dune's command lineboot- building dune itselfdoc- documentationotherlibs- public libraries that live in this repository. not necessarily dune relatedsrc- the majority of the source codesrc/dune_rules- build rule generation (main logic)src/dune_engine- incremental build enginesrc/dune_lang- configuration file parser
test- dune's test suitevendor- 3rd party code pulled into dune.
make check # Quick build (recommended for development)
make dev # Full build
make fmt # Auto-format code (always run before committing)dune runtest dir/test.t # To run a .t test (each .t is a full dune project)
dune promote dir/test.t # To accept test output changes
make test # To run all tests (567+ tests, very slow)- Always verify changes build with
make check - Run
make fmtto ensure code formatting (requires ocamlformat 0.27.0) - Keep lines under 80 characters
- Don't add excessive comments unless prompted
- Don't disable warnings or tests unless prompted
- Use pattern-matching and functional programming idioms
- Avoid
assert falseand other unreachable code
- NEVER create files unless absolutely necessary
- ALWAYS prefer editing existing files
- NEVER proactively create documentation files (*.md) or README files
- NEVER stage or commit changes unless explicitly requested
- NEVER run
dune clean - NEVER use the
--forceargument - NEVER try to build dune manually to run a test