Show HN: Spindle – a full-featured, type-safe web framework for OCaml 5
Spindle is a new Eio-native, type-safe web framework for OCaml 5 featuring an RFC-strict HTTP engine and automated OpenAPI docs.
summary is enough The README provides a concise overview and code example, but deeper evaluation requires checking the GitHub repository.
summary
Spindle is a newly released web framework for OCaml 5 designed around the Eio library and multicore architecture. It features a custom, RFC-strict HTTP/1.1 engine, end-to-end type safety via derived wire types, and automatic OpenAPI generation with Scalar. The documentation provides a basic code example demonstrating route definition, validation, and request handling. Commenters offer constructive technical advice on leveraging Eio capability restrictions.
key points
- Built natively on OCaml 5's Eio library for multicore concurrent execution.
- Implements an RFC-strict HTTP/1.1 and WebSocket engine tested against standard specifications.
- Provides end-to-end type safety with automatic OpenAPI documentation and frontend schema generation.
who should read it
OCaml developers looking for a modern, batteries-included web framework.
discussion positive
consensus
Commenters are generally enthusiastic about a modern OCaml web framework, with notable technical feedback from core contributors.
pushback
One user expressed skepticism regarding the AI-generated aesthetic of the project's landing page.
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...
Advises using Eio capability restrictions like open_subtree for safer static file serving and path sandboxing.
Generated by an LLM from the article and thread. Check the sources before relying on it.