Nice work! Just looking through the Eio code, you may want to use the capability restrictions more. For example, in the static file serving code, you can use `Eio.Path.open_subtree` which will use Linux fd sandboxing to prevent accidental symlink escapes or other ways to leave that subtree: https://ocaml-multicore.github.io/eio/eio/Eio/Path/index.htm...
Open hyphatech.github.iohyphatech.github.io/spindle
Spindle
A full-featured, type-safe web framework for OCaml 5 with RFC-strict HTTP/1.1, WebSockets, SSE, OpenAPI generation, and frontend schema derivation.
Visit project- First shared
- Nov 5, 2026
- HN activity
- 6411
Show HN@zaievNov 5, 2026
Show HN: Spindle – a full-featured, type-safe web framework for OCaml 5
Spindle is a multicore-by-design, eio-native web framework for modern OCaml. Its central idea is to provide an expressive, type-driven API and derive the rest: codecs, request validation, OpenAPI spec and frontend schemas (Zod and Melange). This keeps contracts in sync between server and client without maintaining separate definitions. The framework includes an RFC-strict HTTP server, composable dependencies, WebSockets, SSE and high-level primitives for building MCP servers. It also provides production-ready essentials like distributed tracing, OT-compatible metrics, logging and other features you would expect. Speed was never the goal but the benchmarks show it running x2 faster than NestJS and x5 faster than FastAPI on a single core. Give it a try. Documentation: https://hyphatech.github.io/spindle/
Community