# Spindle – a full-featured, type-safe web framework for OCam…

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 wit…

- **Page:** https://magpie.gallery/i/spindle-a-full-featured-type-safe-web-framework-fo-4s8i
- **Type:** Link to an idea elsewhere
- **Category:** AI & dev
- **Tags:** ocaml, web-framework, type-safe, openapi, mcp

## Source

Web · zaiev: Spindle – a full-featured, type-safe web framework for OCaml 5

- **Original:** https://news.ycombinator.com/item?id=50377613

> 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/ https://github.com/hyphatech/spindle

## GitHub projects

- https://github.com/hyphatech/spindle

## Rules for reuse

- Build your own version: don't copy another product's code, look, icons, colours or copy.
- The original belongs to its author; Magpie only links to it.
- The original content's copyright belongs to its creator. Magpie doesn't download or re-upload it; we only show the link and the official preview.
