package caps
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=84dac271a62bd7f13776958561fa9056
sha512=85701a1dd5a584ea795e6b2101aa8a07b3d1ab616a302b013b1d18bf2d69e287e3392a6d30d06e228c8fbd30f41a137b6bbced02e75d9c72c99293b40e27dc9b
doc/README.html
ocaml-caps
Overview
Cap.ml is a small library providing capability types to use in a disciplined manner the UNIX system calls behind standard library functions such as Sys.command, Unix.fork, or even Stdlib.open_in. When combined with the use of the Semgrep tool and capability rules, it can offer stronger guarantees on a codebase.
Documentation
See https://aryx.github.io/ocaml-caps/caps.html for more information. My OCaml workshop 2026 presentation is also available here: https://www.youtube.com/watch?v=4t_2wLz9EOo and the slides here: https://aryx.github.io/ocaml-caps/
You might find also useful the related https://github.com/aryx/ocaml-commons project that provides a few additional modules using capabilities.
History
The library was developed in 2024 while I was working at Semgrep but got extracted in its own repository in August 2026 (mostly as support for my OCaml workshop 2026 presentation).
AI disclaimer
The OCaml code in this library was written by a human (me, Pad). The code is actually very small. The Semgrep rules were also written by me.
The scripts/ were written by Claude Code to compute usage statistics of capability types in OCaml projects. The Dockerfile, GHA workflows, and a few other configuration files were written by Claude Code, but mostly derived from my other projects (and written by me).