Show HN: Riot, a modern multicore actor-based ecosystem for OCaml

leostera1 pts0 comments

Riot · OCaml stack tech-demo<br>Riot is an in-progress preview. Commands, packages, APIs, and docs may change before release.

☼ 🏴‍☠️<br>Riot<br>There are many OCaml stacks, this one is mine.<br>curl -sSL https://get.riot.ml | sh copy

Riot for agents → llms.txt

Why Riot?

Riot is a tech-demo of a stack and tooling for building applications in OCaml.<br>It is heavily opinionated, and designed from the ground up to get<br>out of your way and help you ship great software with agents.

It comes with a single tool for all your needs, a modern package<br>registry, a multi-core ready actor-model runtime, a whole new<br>standard library, and first-class support for agentic work.

Riot is also a tool: riot — and it's the only tool<br>you need in this stack.

It covers your usual SDLC needs:

.agents Agent friendly riot build Easy, fast builds riot fmt One house style riot fix Linting and codemods riot test Testing riot fuzz Coverage-guided fuzzing riot snapshots Snapshot review riot bench Benchmarking pkgs.ml Package registry riot init / new Golden-path scaffolding riot toolchain OCaml toolchains riot doc Documentation riot run Run executables riot pkg:cmd Package provider commands<br>.agents/skills/riot-ml<br>[learn more]<br>Agent friendly

Riot ships with agent-facing instructions, not just human<br>docs. The riot-ml skill tells agents how to use<br>the stack, which commands to prefer, where workflows live, and<br>how to keep package discovery grounded in pkgs.ml.

Every new Riot project created with riot init includes an .agents folder with the Riot skill already there. Start the project, then use your agent.<br>The local skill explains how to build, test, benchmark, run, format, fix, fuzz, and maintain Riot projects.<br>Riot commands prefer structured output with --json, so agents can inspect build results, diagnostics, test runs, package metadata, and registry flows without scraping prose.<br>The skill links deeper workflow references for testing, fuzzing, benchmarking, snapshots, and package lookup, so agents can run the right loop instead of guessing.<br>/llms.txt is the public discovery map for agents that find Riot from the web; inside a Riot workspace, the local skill is the starting point.<br>Start with agents included A new Riot workspace already has the local agent instructions it needs.<br>$ riot init app<br>$ cd app<br>$ ls .agents/skills Use structured command output JSON output turns command results into data an agent can route, summarize, or repair from.<br>$ riot build --json<br>$ riot test --json<br>$ riot bench --json Find packages without guessing Use the package registry and its agent guide when a workflow needs dependencies or package docs.<br>$ riot search std --json<br>$ curl https://pkgs.ml/llms.txt

riot build

Easy, fast builds

Riot builds packages. A package is the unit of the build, and<br>each package is defined by a plain riot.toml file.

Riot implements a new package-aware build system, so package boundaries, dependencies, targets, and generated artifacts all belong to the same model.<br>riot.toml is ordinary TOML: no S-expressions, no separate configuration language, and no hidden build folklore.<br>Build one package, the whole workspace, debug builds, release builds, and cross targets from the same command.<br>Target selection supports exact triples and broad patterns like linux.<br>Build everything Build every package in the workspace with the default debug profile.<br>$ riot build Build one package Narrow the build to one package when you know the slice you are working on.<br>$ riot build -p std Build release artifacts Use the release profile when you need optimized output or want to catch release-mode differences.<br>$ riot build --release Cross-compile to Linux Select a target pattern or exact triple from the targets declared in your toolchain config.<br>$ riot build -x linux

riot fmt

One house style<br>riot fmt is a fast zero-config formatter optimized<br>for readability and minimizing diffs.

There is one house style, and no options. Done.<br>Formatting is part of the stack, not a project-by-project bikeshed.<br>Output should be readable first and stable enough that reviews show the actual change.<br>Format the workspace Rewrite files in place. The default path is the one you use locally.<br>$ riot fmt Format one path Point the formatter at a package, directory, or file when the work is narrow.<br>$ riot fmt packages/std/src Check in CI Ask Riot to report formatting drift without rewriting files.<br>$ riot fmt --check --json What the rewrite feels like The formatter should make intent easier to read and keep the diff boring.<br>- let greeting name=print_endline("hello, "^name)<br>+ let greeting = fun name -><br>+ print_endline ("hello, " ^ name)

riot fix

Linting and codemods<br>riot fix is an extensible linter with automated<br>fixes, codemods, and package-provided rules.

Riot fix should not just tell you something is wrong. When Riot knows the fix, it shows the edit and can apply it.<br>Packages can register lint rules and fixes, then workspaces or packages can enable those rules in riot.toml.<br>This is what makes...

riot package build agents agent json

Related Articles