Reference¶
Every 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¶
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, spindle.http, spindle.client |
The framework; HTTP as both ends speak it; calling another server, which links no framework |
spindle-postgres |
spindle-postgres |
A server’s Postgres: bounded connections, a pool, a transaction per borrow |
spindle-cli |
spindle-cli |
An application’s command line: its API’s document and Zod schemas |
wiretype, ppx_wiretype |
wiretype, ppx_wiretype |
JSON as descriptions, and the deriver that writes one, released on their own; installed with spindle |
rowtype, rowtype-postgres, rowtype-migrate |
the same | A statement described once, its Postgres backend, and migrations, released on their own; spindle-postgres installs the first two, and rowtype-migrate is installed by itself (opam install rowtype-migrate) |
postgres-eio |
postgres-eio |
The Postgres driver, released on its own |
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_postgres– a server’s Postgres.Spindle_cli– an application’s command line.
What it is built on¶
Wiretype– JSON as descriptions, and what[@@deriving wiretype]writes, documented in its own repository.Rowtype,Rowtype_postgresandRowtype_migrate– a statement described once, running one, and migrations, documented in their own repository.Postgres_eio– the driver, documented in its own repository.