Riot logo

There are many OCaml stacks. This one is mine.

curl -sSL https://get.riot.ml | sh
$ riot run leostera/create-riot-app
Fetching toolchain...
Creating app...
Building app...
Running app...

hello from riot

About

Riot is a stack for building applications in OCaml. It reflects how I like to build systems: one toolchain, one runtime model, and one cohesive experience from writing code to running it.

I care about a few things: a unified tooling story like Go, fast feedback loops, an actor model with supervision like Elixir, and a strong type system like OCaml and Rust. Riot brings those together into a single way of working.

It comes with a runtime built around actors and message passing, a standard library for real applications, and a toolchain that handles building, testing, formatting, and packaging without making you assemble it yourself.

This is not meant to be everything for everyone. It's just my way of building systems in OCaml, shared as-is.

Why Riot?

Riot is my vision of a great developer experience, rooted in OCaml and inspired by Erlang. It ships as a complete stack for building type-safe, multicore applications without having to assemble the pieces yourself.

Riot ships with riot , the only tool in the stack. Riot is the package manager, build system, task runner, toolchain manager, formatter, and linter. One tool, one workflow, one place to do the work.

If you like tooling that gets out of your way and a strong foundation for building real systems, Riot should feel natural.

What Riot Gives You

Type safety comes from OCaml.

Riot gives you a way to build systems.

That difference matters. OCaml already gives you a strong foundation for writing correct code. Riot tries to answer a different question: once your program becomes a long-running application, how should it be structured so it stays understandable, observable, and resilient when things go wrong?

The answer Riot leans into is inspired by Erlang and Elixir. Applications are made of long-lived actors that communicate through messages and live under supervisors. Instead of pretending failures will not happen, the system is built around the idea that they will. Processes crash. Supervisors restart them. The application keeps moving.

Actors.

Messages.

Supervisors.

Systems fail.

Riot embraces that.

That makes Riot closer in spirit to Erlang and Elixir than to the usual OCaml application story, but it stays rooted in OCaml's strengths: static types, fast builds, and a language that is still a pleasure to write.

Std

Std is not a conventional utility standard library. It is Riot's application layer: the place where the runtime, the system model, and the everyday operational pieces come together into something you can actually build on.

It re-exports the core primitives you need, but more importantly it gives you the parts that usually end up scattered across a dozen decisions: supervision and lifecycle, structured logging, telemetry, typed configuration, networking, file and process I/O, testing, benchmarking, and the rest of the shape of a real application stack.

You do not start from a blank project and then slowly rediscover what your stack ought to look like. You start from a system that already has opinions about how applications should be structured and run.

Concurrency & fault tolerance

Actors, supervision, lifecycle, and long-lived systems built to survive failure.

Observability

Structured logging, telemetry, and event-driven visibility are part of the stack from day one.

Configuration

Typed configuration, validation at startup, and environment-aware loading without stringly-typed guesswork.

I/O, networking, and data

Filesystem, TCP, HTTP, TLS, JSON, TOML, CSV, and the rest of the boring but necessary surface area.

Parallelism

Tasks, worker pools, timers, and scheduling tools for the parts of your system that need more than one actor.

Testing & benchmarking

Built-in runners and conventions for verifying behavior and measuring performance without assembling another toolchain.

Riot

Riot is Riot's toolchain. It is the thing that makes the whole experience feel cohesive instead of improvised. It installs what you need, fetches the right compiler, builds your project, runs it, tests it, formats it, and manages dependencies through one consistent interface.

I wanted the toolchain to feel like an instrument: something you trust enough that you stop thinking about it while you work. That is why the first experience matters so much. You run one install command, then you create and run an app immediately. The setup fades into the background where it belongs.

Installs everything. Builds and runs your app. Runs tests and formats code. Manages dependencies and packages.

No setup. No glue. No separate story you have to invent before the real work starts.

Code

spawn (fun () ->
  match receive () with
  | Hello_world -> ...
)

Philosophy

Riot is opinionated on purpose. It values convention over endless configurability, vertical integration over a puzzle of interchangeable parts, and programmer happiness over the performance of having infinite choices all the time.

There is one stack here. You do not fight it. You use it, extend it where it makes sense, and let its defaults carry most of the weight. If that sounds restrictive, Riot may not be for you. If that sounds relieving, you probably already understand it.

One stack.

You don't fight it.

Read the doctrine →

Packages

Riot also has a growing package ecosystem through pkgs.ml. The point is not just to let you consume packages, but to let you grow the stack in the same style it was built: one tool, one workflow, one place to share and reuse code.

You can add packages to a project, publish your own, and help shape what this ecosystem becomes by using it. Riot is mine, but it does not have to stop with me.

riot add <package>
riot publish

Community

This is still early, and that is part of the fun. Riot is growing in public. The ideas are clear, the stack is real, and there is still plenty of room for the ecosystem and the community around it to take shape.

If this way of building resonates with you, come hang out on Discord and help push it forward.

Come hang out on Discord →