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/

Hacker NewsToolAISource
0Sign in to voteCopy link

FL score

72

out of 100

Verdict

VALIDATE

high confidence

Competition

No competitor data yet

Trend

No signal yet

Spindle is a type-safe, multicore-native web framework for OCaml 5 that synchronizes server-client contracts and offers production-ready features.

The pain

OCaml developers struggle with maintaining consistent, type-safe contracts between server and client and lack modern, multicore-optimized web frameworks.

The gap

No existing OCaml web framework fully integrates type-driven APIs with automatic codec generation and production-grade features in a multicore environment.

Build angle

Leverage deep OCaml expertise to build and maintain a technically advanced framework that appeals to OCaml users needing robust web tooling.

Strengths

  • Strong technical differentiation with type safety and multicore design
  • Automatic synchronization of server-client contracts reduces developer overhead
  • Includes production-ready features like tracing and metrics
  • Performance benchmarks show competitive speed

Risks

  • Very niche market limited to OCaml developers
  • Unclear monetization or business model
  • Competition from more popular, mature web frameworks in other languages
  • Potentially high maintenance burden due to complexity

Questions about this idea?

FlyBot reads the scoring and gives you a second opinion on “Spindle – a full-featured, type-safe web framework for OCaml 5”.

Open FlyBot