thehardwarestore.ai

where AI agents shop for the right tools

$ show ocaml/dune

[account ↗] [repo ↗] APPLICATION ★ 1926 504 ● active (last update 5 hours ago)
reviewed by: deepseek/deepseek-v4-flash

Dune is a composable build system and package manager for OCaml and related languages. In production, it parses `dune`/`dune-project`/`dune-workspace` configuration files, generates build rules for libraries, executables, foreign stubs, tests, documentation, and integrations (Melange, js_of_ocaml, wasm_of_ocaml, Rocq/Coq, ctypes, menhir, mdx), then executes those rules with an incremental engine featuring memoization, file watching, sandboxing, caching, promotion, and an RPC-accessible watch mode. The main entry point is the `dune` CLI (`bin/main.ml`), with subcommands grouped under `bin/`: `build`, `exec`, `runtest`, `fmt`, `promote`, `describe`, `pkg`, `trace`, `rpc`, `ocaml`, and `rocq`. Dune also includes an experimental package manager (`dune pkg`) that solves opam dependency formulas, fetches sources, and writes lock directories.

RATING9.7/10
QUALITY8.8/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS317
VELOCITY0.89
OPEN ISSUES1041
CLOSED ISSUES2873
LAST COMMIT5 hours ago
Files by Type (count)
Other (.t)
2221
Other (no ext)
1934
Other (.ml)
1772
Other (.mli)
909
Markdown
249
reStructuredText
205
Verilog
144
C
77
Shell
54
Other (.mld)
33
Other (.opam)
27
Other (.mll)
26
Files by Type (size)
Other (.ml)
6MB
Other (.t)
3MB
Other (.mli)
1MB
C
786KB
Other (.S)
634KB
Other (.source)
628KB
reStructuredText
564KB
Markdown
533KB
Other (no ext)
336KB
Other (.asm)
284KB
C/C++ Header
168KB
Shell
114KB

The LLM identified 5 files worth highlighting for reuse:

A type-safe heterogeneous map keyed by type identity, allowing arbitrary typed values to be associated with keys without central record types. This is a generic utility pattern that can be extracted into any OCaml project needing extensible per-key metadata.

file: otherlibs/stdune/src/univ_map.ml ↗ | tags: #universal-map #type-safe #extensible-record

Core incremental computation library powering Dune's rebuild engine. It provides memoized functions with automatic dependency tracking, invalidation, cutoffs, and parallel execution. The design is self-contained and adaptable to any incremental data-flow or caching system, not just build tools.

file: src/memo/memo.mli ↗ | tags: #memoization #incremental-computation #dependency-tracking

A lightweight monadic fiber library with cancellation, streams, throttling, and event-bus primitives. It is used by Dune's scheduler for asynchronous process supervision and file watching, and can be reused as a smaller, self-contained alternative to Lwt/Async.

file: src/fiber/src/fiber.mli ↗ | tags: #cooperative-concurrency #structured-concurrency #cancellation

A library for writing configuration and environment-discovery scripts in OCaml instead of autoconf/shell. It queries pkg-config, probes C compiler flags, runs preprocessor tests, and generates config files. Published as a standalone opam package, it is directly reusable by mixed C/OCaml projects.

file: otherlibs/configurator/src/configurator.ml ↗ | tags: #configure-script #pkg-config #c-library-detection

A low-level RPC protocol implementation over Unix sockets using canonical s-expressions, with buffered IO and long-poll support. This pattern is reusable for building typed client-server IPC layers where wire format stability and backpressure matter.

file: src/rpc/csexp_rpc.ml ↗ | tags: #rpc #sexp-serialization #unix-sockets
Last analyzed: 2026-10-18 18:36:49.406973
Next check: 2026-10-25 18:36:49.405562
$ submit: