{"id":50459525,"url":"https://github.com/leostera/riot-lib","last_synced_at":"2026-06-08T20:01:02.520Z","repository":{"id":197267894,"uuid":"698253815","full_name":"leostera/riot-lib","owner":"leostera","description":"An actor-model multi-core scheduler for OCaml 5 🐫","archived":false,"fork":false,"pushed_at":"2024-11-13T01:49:55.000Z","size":605,"stargazers_count":692,"open_issues_count":1,"forks_count":45,"subscribers_count":9,"default_branch":"main","last_synced_at":"2026-05-25T15:24:29.730Z","etag":null,"topics":["actor-model","elixir","erlang","fault-tolerance","multicore","multicore-ocaml","ocaml","otp"],"latest_commit_sha":null,"homepage":"","language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leostera.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"leostera"}},"created_at":"2023-09-29T13:57:12.000Z","updated_at":"2026-05-25T14:37:29.000Z","dependencies_parsed_at":"2023-12-29T19:29:25.969Z","dependency_job_id":"f8879b79-2aae-402c-913b-c901c4e42de0","html_url":"https://github.com/leostera/riot-lib","commit_stats":null,"previous_names":["leostera/riot","riot-ml/riot"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/leostera/riot-lib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Friot-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Friot-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Friot-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Friot-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leostera","download_url":"https://codeload.github.com/leostera/riot-lib/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Friot-lib/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34078019,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actor-model","elixir","erlang","fault-tolerance","multicore","multicore-ocaml","ocaml","otp"],"created_at":"2026-06-01T04:00:38.876Z","updated_at":"2026-06-08T20:01:02.494Z","avatar_url":"https://github.com/leostera.png","language":"OCaml","funding_links":["https://github.com/sponsors/leostera"],"categories":["OCaml","\u003ca name=\"OCaml\"\u003e\u003c/a\u003eOCaml"],"sub_categories":[],"readme":"\n\u003ch1 align=\"center\"\u003e\n  \u003cimg alt=\"riot logo\" src=\"https://github.com/leostera/riot/assets/854222/bdae366b-6547-49df-a3c7-fe4f506b5d23\" width=\"300\"/\u003e\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\nAn actor-model multi-core scheduler for OCaml 5.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#quick-start\"\u003eQuick Start\u003c/a\u003e |\n  \u003ca href=\"https://github.com/leostera/riot/tree/master/examples#readme\"\u003e\n    Tutorial\u003c/a\u003e |\n  \u003ca href=\"https://ocaml.org/p/riot/latest/doc/Riot/index.html\"\u003eReference\u003c/a\u003e\n  \u0026nbsp;\u0026nbsp;\n\u003c/p\u003e\n\nRiot is an [actor-model][actors] multi-core scheduler for OCaml 5. It brings\n[Erlang][erlang]-style concurrency to the language, where lightweight processes communicate via message-passing.\n\n\u003c!-- $MDX file=test/readme_example.ml,part=main --\u003e\n```ocaml\nopen Riot\n\ntype Message.t += Hello_world\n\nlet () =\n  Riot.run @@ fun () -\u003e\n  let pid =\n    spawn (fun () -\u003e\n        match receive () with\n        | Hello_world -\u003e\n            Logger.info (fun f -\u003e f \"hello world from %a!\" Pid.pp (self ()));\n            shutdown ())\n  in\n  send pid Hello_world\n```\n\nAt its core Riot aims to offer:\n\n* **Automatic multi-core scheduling** – when you spawn a new Riot process, it\n  will automatically get allocated on a random scheduler.\n\n* **Lightweight processes** – spawn 10 or 10,000 processes as you see fit.\n\n* **Fast, type-safe message passing**\n\n* **Selective receive expressions** – when receiving messages, you can skim\n  through a process mailbox to consume them in arbitrary order.\n\n* **Process links and monitors** to keep track of the lifecycle of processes\n\nRiot also includes:\n\n* **Supervisors** to build process hierarchies\n\n* **Logging** and **Telemetry** designed to be multicore friendly\n\n* an **Application** interface to orchestrate startup/shutdown of systems\n\n* **Generic Servers** for designing encapsulated services like with Elixir's [GenServer][genserver]\n\n### Non-goals\n\nAt the same time, there's a few things that Riot is not, and does not aim to be.\n\nPrimarily, Riot is not a full port of the Erlang VM and it won't support\nseveral of its use-cases, like:\n* supporting Erlang or Elixir bytecode\n* hot-code reloading in live applications\n* function-call level tracing in live applications\n* ad-hoc distribution\n\n## Quick Start\n\n```\nopam install riot\n```\n\nAfter that, you can use any of the [examples](./examples) as a base for your app, and run them:\n\n```\ndune exec ./my_app.exe\n```\n\n## Acknowledgments\n\nRiot is the continuation of the work I started with\n[Caramel](https://github.com/leostera/caramel), an Erlang-backend for the OCaml\ncompiler.\n\nIt was heavily inspired by [eio][eio] by the OCaml Multicore team and\n[miou][miou] by [Calascibetta Romain](https://twitter.com/Dinoosaure) and the\n[Robur team](https://robur.coop/), as I learned more about Algebraic Effects.\nIn particular the `Proc_state` is based on the `State` module in Miou.\n\nAnd a thousand thanks to [Calascibetta Romain](https://twitter.com/Dinoosaure)\nand [Antonio Monteiro](https://twitter.com/_anmonteiro) for the discussions and\nfeedback.\n\n[actors]: https://en.wikipedia.org/wiki/Actor_model\n[erlang]: https://erlang.org\n[eio]: https://github.com/ocaml-multicore/eio\n[miou]: https://github.com/robur-coop/miou\n[genserver]: https://hexdocs.pm/elixir/1.12/GenServer.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleostera%2Friot-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleostera%2Friot-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleostera%2Friot-lib/lists"}