OCaml Weekly News

Previous Week Up Next Week

Hello

Here is the latest OCaml Weekly News, for the week of November 25 to December 02, 2025.

Table of Contents

avro-simple, an OCaml implementation of Apache Avro

Tim McGilchrist announced

I’ve been building a library for Apache Avro called avro-simple. It is an OCaml implementation of Apache Avro with codec-based design, schema evolution support, and container file format.

The key principles for this library are:

  • Value-centric design: Manual codec construction using combinators (no code generation required)
  • Pure OCaml: No external C dependencies for core functionality
  • Schema evolution: Built-in support for reading data with different schemas
  • Container files: Full support for Avro Object Container File format
  • Compression: Multiple compression codecs (null, deflate, snappy, zstandard) with compression plugins
  • Streaming: Memory-efficient block-level streaming for large files
  • Type-safe: Codec-enforced types with composable combinators

This compares to ocaml-avro which uses code generation based on JSON schemas and is missing some of the schema evolution features.

I'm mainly using this for reading and writing Avro container files, however it should be possible to integrate with ocaml-kafka if you use Kafka. The performance is reasonable so far, 1.4 times slower than the fastest Rust based library I could find and I haven't really tried to optimise it yet. HEAPs faster than the official Apache Avro libraries in Python.

There are a few other places I think I can improve the performance and memory usage, but it should be quite usable for small to medium sized files. Enjoy :slight_smile:

Sunsetting of DkML distribution

jbeckford announced

DkML, the Windows-friendly distribution of OCaml, is being sunset. DkML was launched to get Windows + OCaml off life-support when an earlier Windows distribution was retired. Mission accomplished. And thanks to OCSF for the support in the early years!

Existing users: Official end-of-life for the distribution will be 12/31/2026. 1 year and 1 month from this posting the distribution binaries, C libraries and overlay repositories will no longer be hosted. Please use the native Windows support from opam!

To be clear, the Windows distribution is the following two products which will disappear:

  • dkml-installer: This is the Windows installer available through winget (https://winstall.app/apps/Diskuv.OCaml). I’ll withdraw it from winget soon; that won’t affect existing users.
  • setup-dkml: This is the GitHub/GitLab CI for MSVC.

In contrast, the following products are much broader than Windows, are actively maintained, and will not be sunset:

  • dkml-compiler and dkml-base-compiler. These have patches for Android and bytecode.
  • MlFront and dk. This is the build and scripting system; more on that in upcoming announcements.

opam 2.5.0 is out!

Kate announced

Hi everyone,

We're happy to announce the release of opam 2.5.0 and encourage all users to upgrade.

Note: the following section will recap the various major changes in opam 2.5.0 for anyone who haven't already read the previous pre-release announcements. For those who did, note that nothing changed between 2.5.0~beta1 and the final 2.5.0.

What’s new? Some highlights:

  • :high_speed_train: Speedup opam update up to 70%. Thanks to @arozovyk, opam update now load opam file incrementally, only parsing the files that have changed since the last time you called opam update. Before that, opam files in opam repositories were all loaded after an update if there was any change. The performance improvement of this change thus depends on how often you call opam update and what type of repository and OS you are using. (#5824)
  • :spiral_shell: Improved shell integration. A number of users have been hitting issues with opam's shell integration where parts of a previous environment was kept in the current environment, causing a number of issues. These can be triggered by, for example, nuking your opam root directory (by default ~/.opam or %LocalAppData%\opam). For this particular case we are still working on a fix, but many other users have reported similar issues without nuking their root directory and in that case we believe to have fixed the majority of issues. (dbuenzli/topkg#142, #4649, #5761)
  • :spiral_shell:² We've also changed the default file to which opam init writes the opam shell integration to be .bashrc instead of the previous .profile or .bash_profile when bash is detected. Doing it this way prevents some issues with existing .profile files that source the .bashrc file and causing an infinity loop when opam asks users to make sure to source their .bashrc file into their .profile file. (#5819, #4201, #3990)
  • :shield: The opam install script now installs an appropriate apparmor profile on systems configured with apparmor (this is enabled by default on Ubuntu). This change is not strictly speaking related to this release as it is deployed for every versions. (#5968).
  • :ocean: Many more UI additions and improvements, bug fixes, …

:open_book: You can read our blog post for more information about these changes and more, and for even more details you can take a look at the release note or the changelog.

Try it!

The upgrade instructions are unchanged:

For Unix systems

bash -c "sh <(curl -fsSL https://opam.ocaml.org/install.sh) --version 2.5.0"

or from PowerShell for Windows systems

Invoke-Expression "& { $(Invoke-RestMethod https://opam.ocaml.org/install.ps1) } -Version 2.5.0"

Please report any issues to the bug-tracker.

Happy hacking, <> <> The opam team <> <> :camel:

Transient emacs command for dune

Paul-Elliot announced

Hello!

:tada: On the behalf of everyone who has contributed to a training set for an LLM by writing something on the internet, I'm happy to announce the release of dune-transient, an emacs transient command to drive dune! :tada:

When invoked with M-x dune-transient, it opens a first panel:

main_panel.png

Some keys provide direct access to common workflows. Pressing B will open a subsequent panel allowing you to build your very own command in the transient way:

build_panel.png

Now that you know the gist of the tool, let me quote an important part of the README^[This text was written by me so it's acceptable to publish it here!]:

It was built entirely by an AI. I was only in charge of copy-pasting various bits of inscrutable text from one place to the other.

As a consequence, I'm afraid this project cannot accept contributions made by humans. We need to wait a bit before humans are reliable enough. You are however welcome to open PR, provided both the PR text and the code in it has been written by an AI, without human review.

If you find it useful, you are welcome to use it, even if you are not 100% an AI.

You've been warned!

Slipshow!

Paul-Elliot announced

I'm back!

Slipshow 0.7.0: The Slipshow of Dorian Gray

It's with guilty pleasure that I announce the new release of Slipshow 0.7.0: The Slipshow of Dorian Gray, on opam.

$ opam update
$ opam upgrade slipshow

This release contains a handful of bugfixes. But the highlight of the changelog is an experimental support for recording and replaying annotations!

Peek 2025-11-26 13-25

The gif above was made using the new feature. You can also view it live. If you want an example of a more interesting use of the feature than a picture of me grow old, you can also see this presentation. You can also find the doc here.

The exclusive feature, that might not be obvious above, is that once you've recorded a series of strokes, you can edit it. For instance, here is the timeline for this presentation:

05f6493543d78b90cc6b53c17bbcc520bbb399d2.png

You can see it live and edit it by pressing Shift + R in the presentation, and selecting one of the recording in the dropdown on the bottom left.

However experimental this is, I can't wait to see what kind of good and bad uses it can have for your presentations. Please post them here!

Thanks a lot to NLNet for their invaluable support.

And before the changelog, an exclusive information relevant to OCaml users! The drawing edition UI, and actually the whole drawing mechanism, is made using Functional Reactive Programming, in particular with @let-def's brr-lwd library! As always, I'd like to say thank you to the developers of open source libraries, you are so great.

Here are the release notes:

BREAKING CHANGES!

  • I removed support for the "setext" headings: Underlining a title with dashes will no longer make a title. Sorry for breaking a standard, but that messes too much with the --- separator. Replace it with atx headings: # This is a title.
  • A bug in the carousel was fixed, breaking the workaround. If you used +2 to go to the next meaningful page, you can now change that, either to +1 or to all.
  • The semantics of focus and unfocus was changed. Before, you had to unfocus as many times as you focused. Now, you have to unfocus only once.
  • If you find any migration problem, please open an issue and I'll help for the migration!

Compiler

  • Embed Liberation Sans fonts (and use them) (#150)
  • Fix missing favicon (which was missing since speaker view) (#150)
  • Fix changing step number from speaker note does not update serve mode state (#154)
  • Fix blank lines considered as elements in carousel (#170)
  • Allow to specify port in slipshow serve with -p or --port (#176)
  • Fix link with no content in block raising a syntax error (#180)
  • Remove support for Setext headings (#178)

Engine

  • Allow to record and replay strokes (#187)
  • Fix speaker note scrolling (#150)
  • Fix script undos recovery when script execution fails (#150)
  • Hide paused/unrevealed elems also for mouse (#150)
  • Don't execute scripts when computing toc (#150)
  • Mute medias in speaker view (#152)
  • Use the perfect-freehand library to generate strokes. (#151)
  • Fix order of execution of actions (center after enter) (#171)
  • Fix pauses not being scoped in slides (#179)
  • Fix exiting not where it should (#179)
  • Fix unfocus behavior to match the docs (#179)
  • Fix wrong position bug on custom dimensions (#182)
  • Fix infinitely jiggling autoresizing (#187)
  • Fix not being able to draw outside of inner presentation (#187)
  • Fix permanent fast-moving bug (#187)

Two open roles at Tarides: Compiler Engineer and VP of Software Engineering

Thomas Gazagnaire announced

Hi all,

Tarides’ mission is to help make OCaml mainstream. We work across the stack: contributing upstream to the compiler, maintaining ecosystem tooling, and supporting organisations that rely on OCaml in production. Our work ranges from training and team extensions to full product development. For instance, Tarides recently spun off Parsimoni which builds software-defined satellite systems using a platform based on MirageOS (in OCaml) and Unikraft. We also collaborate with companies that already operate large OCaml codebases, such as Jane Street and Semgrep, supporting them on targeted projects and long-term initiatives.

To sustain this breadth of activity, we are opening two roles on https://tarides.com/careers/.

Compiler Engineer

The compiler team at Tarides has been central to major changes in OCaml over the past years, including the design and integration of the multicore runtime and effect handlers in OCaml 5. Beyond that milestone, the team continues to shape the evolution of the language and its runtime: improving the OCaml/WASM toolchain, refining the behavior of OCaml 5 programs under load, and exploring new directions for the type system and tooling. The role suits someone who enjoys language implementation, runtime internals, and the practical constraints of deploying OCaml in production environments (especially performance).

Details: https://jobs.world.luccasoftware.com/tarides-com/compiler-engineer-a384e70c-cd83-4c82-9cdb-a2ab121329a7

VP of Software Engineering

As our projects and teams have grown, we are looking for a VP of Software Engineering to guide the group of team leads across Tarides. The role involves structuring delivery, keeping teams aligned with the technical roadmap, and maintaining a clear interface between engineering and the rest of the company. It is a VP-level position, but experienced team leads or engineering managers who are ready to step into a wider leadership role should consider applying.

Details: https://jobs.world.luccasoftware.com/tarides-com/vp-of--software-engineering-ad64996f-0d3c-4991-8af9-6b7f0e943faf

If you would like to discuss either post or want more context about current projects, feel free to reach out.

Best, Thomas

Thomas Gazagnaire later added

And now a third one, to improve the OCaml runtime's performance and create a successor to venerable sandmark.

Runtime Systems Engineer

The multicore work merged in OCaml 5.0 introduced native support for scalable concurrency and shared-memory parallelism. Its design combines effect handlers for expressing structured concurrent workflows, a concurrent garbage collector aimed at responsive networked applications, and a modular memory model that supports local reasoning without sacrificing performance. With these foundations now in the mainline compiler, Tarides is helping partners migrate their systems to OCaml 5.

This third role focuses on the practical side of that transition: developing tooling to understand runtime behaviour, maintaining benchmarks that guide runtime improvements, and collaborating on future directions for the scheduler and GC. It is well-suited to someone who wants to work on the boundary between research-grade runtime design and the realities of large OCaml deployments.

Details: https://jobs.world.luccasoftware.com/tarides-com/runtime-systems-engineer-14f4aa23-9a0d-4d66-88b6-4f5805e70166

RFSM version 2.2

jserot announced

It’s my pleasure to announce the availability of version 2.2 of the RFSM language and compiler.

RFSM is a domain specific language for describing, simulating and generating code from reactive finite state machines.

From a description of a system composed of a set of reactive FSMs, the RFSM compiler can generate

  • graphical description of the system in the .dot format
  • execution traces in the .vcd file format
  • code in C, SystemC and VHDL for simulation or implementation on a target platform

The most significant change since version 2.0 is the introduction of a server mode allowing the compiler to be called on fragments of code. This feature is used by the Grasp application, a graphical front-end to RFSM (superseding the previous Rfsm-Light application).

RFSM is available from this GH page or as an OPAM package.

Comments, feedbacks and bug reports welcome !

Alice v0.2.0, now with LSP

Steve Sherratt announced

I'm happy to announce the release of Alice v0.2.0. Alice is a radical, experimental OCaml build system, package manager, and toolchain manager for Windows and Unix-based OSes. Its goal is to allow anyone to program in OCaml with as little friction as possible.

The main new addition is support for LSP. Alice now generates some additional files that can be interpreted by OCaml-LSP/Merlin. To use OCaml-LSP in an Alice project, make sure to configure your editor to start the LSP server with the command ocamllsp --fallback-read-dot-merlin and install dot-merlin-reader (either by running alice tools install or from the dot-merlin-reader opam package).

See this page for more info on setting up LSP for Alice projects.

Alice has gotten slightly easier to install. There's now a package in the WinGet repository so Windows users can install Alice by running:

winget install OCaml.Alice

There's also a Homebrew tap for Alice, so macOS users can install Alice by running:

brew install alicecaml/homebrew-tap/alice

The Install page has an interactive OS picker that displays install instructions for the current OS by default.

Gendarme, a modular marshalling library

Benjamin Somers announced

Hi everyone!

This is my first post on this forum, and I’m pleased to present Gendarme, a generic-but-opinionated library to marshal and unmarshal OCaml data types in a variety of formats.

Why a new library?

OCaml has a few libraries in the ppx_deriving family, like the famous ppx_deriving_yojson, allowing to very conveniently generate marshallers and unmarshallers for OCaml types. However, two elements didn’t suit me in this approach:

  • These libraries pollute the namespace quite a bit when we start combining them (e.g. when developing user-facing apps that allow ingesting several serialization formats);
  • Adding support for a new format is hard and requires some PPX expertise most OCaml users don’t have.

How the project is born

When discovering the Go language, I was pleasantly surprised by how easy it was to marshal and unmarshal structs with simple annotations, and wanted a similar hassle-free mechanism in OCaml. I also wanted to learn about GADTs, as I never had found any use for them in my projects before. This project was originally named Marshal, but a module of the same name already exists in the standard library. “Gendarme” is one way to translate “Marshal” in French.

What’s particular about Gendarme?

Gendarme is a modular, extendable, PPX-heavy marshaller and unmarshaller based on type witnesses, supporting various data formats (CSV, JSON, TOML, YAML). The curious reader may find way more information on the project’s repository, but here’s the gist:

[%%marshal.load Yojson]

type t = { t_foo: int list [@json "foo"];
           t_bar: t list [@json "bar"] } [@@marshal]
type u = t * int [@@marshal]

let v = ({ t_foo = [1; 2]; t_bar = [{ t_foo = [3; 4]; t_bar = [] }] }, 3)

let json = [%encode.Json] ~v u
(*
val json : string = "[{\"foo\":[1,2],\"bar\":[{\"foo\":[3,4],\"bar\":[]}]},3]"
*)

Annotating a type my_type with [@@marshal] and providing the required additional data (such as field names in the case of records) builds a witness value my_type of type my_type Gendarme.ty that tells Gendarme how to marshal and unmarshal values.

Currently, only a subset of OCaml core types are supported, but generic support gets improved as the need appears in my personal and professional projects.

Gendarme was written both with users (application and library developers) and developers (people developing new Gendarme encoders) in mind. If your target format is able to encode objects/records (optional but nice to have), lists/arrays, and supports arbitrarily nesting them, then writing a new encoder requires writing at most 100 lines of what is essentially pattern-matching cases to tell Gendarme what to do with your data (see for example the code for gendarme-ezjsonm). Each encoder is heavily tested, and most of the encoders that we ship have more lines of code for tests than for their actual logic.

This is a very quick introduction, but if you are interested in this project, head over to its README to learn more! I’m obviously happy to answer any questions you may have.

FUN OCaml is live on YouTube and Twitch

Continuing this thread, Sabine Schmaltz announced

FUN OCaml talks are now uploaded to FUN OCaml's watch.ocaml.org channel:

https://watch.ocaml.org/c/funocaml/videos

ETA: still transcoding :sweat_smile: but due to appear any moment

Other OCaml News

Old CWN

If you happen to miss a CWN, you can send me a message and I'll mail it to you, or go take a look at the archive or the RSS feed of the archives.

If you also wish to receive it every week by mail, you may subscribe to the caml-list.