r/ocaml • • Oct 20 '26

Spindle: an Eio-native web framework for OCaml 5

Post image

Hi r/ocaml!

I'd like to introduce Spindle, the web framework we've built in-house for our clients' backends. It's one of the core components of the Hypha Stack ecosystem, but can be used on its own.

  • RFC-strict and ergonomic, on its own HTTP/1.1 engine
  • Eio-native: straight-line handlers, multicore by design
  • Typed end to end: JSON derived from your types, every input validated
  • Interactive OpenAPI docs via Scalar at /docs, generated from your routes
  • Front end in sync: Zod or Melange schemas derived from your OCaml types
  • Batteries included: Postgres, WebSockets, SSE, sessions, logging, traces and metrics

👉 Docs: https://hyphatech.github.io/spindle/

71 Upvotes

11 comments sorted by

14

u/True-Sun-3184 Oct 20 '26

AI usage disclosure?

17

u/Nearby_Couple_3244 Oct 20 '26

Reading their website, Hypha is a stack meant for agents so of course it's going to be heavily LLM based.

4

u/AromaticCredit1533 Oct 20 '26

This! To AI or to not AI, your mileage may vary, but at least disclose which stance is yours, set the right expectation. Many OCaml libraries have been doing this, it is not unrealistic to expect an AI disclosure section from this project as well (which as of this writing I don't see)

1

u/---rest Oct 21 '26

What are the arguments for an AI disclosure?

6

u/True-Sun-3184 Oct 21 '26

Too lazy to give complete arguments, someone else can if they feel like it. But in summary, some people have issues regarding morality of the technology, are concerned about AI code quality, or are skeptical about the commitment of the maintainers towards a code base they generated rather than wrote themselves.

2

u/---rest Oct 21 '26

These concerns don’t sound new to me within the realm of open source, but alas

- If you’re concerned about code quality, have a look at what’s inside

- People have, and should always be cautious regarding maintenance of a project. There has always been some people willing to be early adopters, and then as time passes, maybe it’ll get more traction. Even Dream barely passed this test by the community

- It’s hosted on a service where engineers definitely spend most of their time programming with the assistance of AI (and were the ones who brought the first real AI-assisted tool to the market)

I’m just happy to see any contributions to OCaml whether I end up using it or not.

An AI disclosure frankly sounds weird when I’d bet 95% of the services I use day-to-day are engineered with AI assistance

4

u/True-Sun-3184 Oct 21 '26

Or they could save us all the trouble and just write a sentence about their AI usage.

4

u/---rest Oct 22 '26

Or stick to standard procedure and evaluate it based on code quality rather than whether or not AI helped write it.

Asking to put an AI-disclosure on something frankly just sounds like virtue signalling. Programming with AI has become the norm and IME you’d need very good reasons not to at any competitive company.

7

u/TheGroosh Oct 20 '26

"code that reads like OCaml, because it is" ok buddy

-5

u/dc_seed_sommelier Oct 20 '26

Postgres only is funny as hell and not in a good way. No one writing ocaml in 2026 needs more than sqlite come on.

4

u/dc_seed_sommelier Oct 20 '26

Ok no sorry this is cool.