Reference
ReferenceEvery module’s interface, generated by odoc from its .mli, where each
function says what it does, what it refuses and what it defaults to.
The packages
Section titled “The packages”Each library is separate, so a program links only what it uses. A dune
file names a library as it is installed (spindle-http); OCaml code names
it as a module (Spindle_http).
| Package | Libraries | What it is |
|---|---|---|
spindle |
spindle |
The framework; installs spindle-http and spindle-client with it |
spindle-http |
spindle-http |
HTTP as both ends speak it |
spindle-client |
spindle-client |
Calling another server, which installs and links no framework |
spindle-sqlite |
spindle-sqlite |
A server’s SQLite: a pool of one file in WAL mode, a transaction per borrow, sessions |
spindle-postgres |
spindle-postgres |
A server’s Postgres: bounded connections, a pool, a transaction per borrow, sessions |
spindle-mcp |
spindle-mcp |
A Model Context Protocol server: the routes an agent calls tools and reads and watches resources through |
spindle-mcp-client |
spindle-mcp-client, spindle-mcp-client.protocol |
Calling another server’s tools, and reading and watching its resources, over MCP, which installs and links no framework, and MCP’s messages, which both ends share |
spindle-cli |
spindle-cli |
An application’s command line: its API’s document, Zod schemas and Melange client |
wiretype, ppx_wiretype |
wiretype, ppx_wiretype |
JSON as descriptions, and the deriver that writes one, released on their own; installed with spindle |
rowtype, rowtype-sqlite, rowtype-postgres, rowtype-migrate |
the same | A statement described once, its SQLite and Postgres backends, and migrations, released on their own; spindle-sqlite and spindle-postgres each install rowtype and their backend, and rowtype-migrate is installed beside them (opam install rowtype-migrate), which builds the dialect of each backend installed |
postgres-eio |
postgres-eio |
The Postgres driver, released on its own |
Spindle
Section titled “Spindle”Spindle– routes, paths, inputs, dependencies, answers, refusals, cookies, the server, the log, streams, WebSockets, static files, the test client, and the API described. The most read:Dep,Path,Returns,Refusal,Log,Static,OpenapiandTest.Spindle_http– HTTP as both ends speak it.Spindle_client– calling another server.Spindle_sqlite– a server’s SQLite.Spindle_postgres– a server’s Postgres.Spindle_mcp– a Model Context Protocol server.Spindle_mcp_client– calling another server’s tools and reading and watching its resources, andSpindle_mcp_protocol– MCP’s messages, which both ends share.Spindle_cli– an application’s command line.
What it is built on
Section titled “What it is built on”Each is released and documented on its own site, and links here go to its reference there.
Wiretype– JSON as descriptions, and what[@@deriving wiretype]writes.Rowtype– a statement described once.Rowtype_sqliteandRowtype_postgres– running one on each database.Rowtype_migrate– migrations, and each database’s way of running them:Rowtype_migrate_sqliteandRowtype_migrate_postgres.Postgres_eio– the driver.
