OCaml
ocaml.org
OCaml
@ocaml.org
Platform Newsletter: September to October 2025
Welcome to the sixteenth edition of the OCaml Platform newsletter! In this September to October 2025 edition, we are excited to bring you the latest on the OCaml Platform, continuing our tradition of highlighting recent developments as seen in previous editions. To understand the direction we're headed, especially regarding development workflows and user experience improvements, check out our roadmap. You can comment on this newsletter on the OCaml Discuss Forums! You can subscribe to this newsletter on LinkedIn! Highlights: * OCaml 5.4.0 Released: Major stable release featuring labelled tuples, immutable arrays, unified array literal syntax, atomic record fields, and four new standard library modules * Security Response Team Established: New team formed to handle security vulnerabilities in the OCaml ecosystem * Enhanced Editor Support: OCaml-LSP 1.24.0 and Merlin 5.6 bring improved project navigation and performance optimizations * OCaml.org Reorganization: Clear separation between news about production-ready features and releases (OCaml Changelog) and ongoing work and experimental features (Backstage OCaml) * Experimental Tools Progress: Gospel ecosystem tools ready for testing, new ocaml.nvim plugin for Neovim users, and experimental Merlin branch using domains and effects OCaml Changelog: * OCaml.org: Introducing Backstage OCaml - Separate Feeds for Stable and Experimental Features (Oct 8, 2025) * OCaml Security Response Team Established (Oct 3, 2025) Backstage OCaml: * Gospel Ecosystem: Tools Ready to Try, Language Evolving (Oct 15, 2025) * Backstage OCaml: ocaml.nvim - A Neovim Plugin for OCaml (Oct 14, 2025) * Backstage OCaml: You Can Try the Experimental Branch of Merlin That Uses Domains and Effects (Oct 8, 2025) Stable Releases: * Release of OCaml 5.4.0 (Oct 9, 2025) * opam-publish 2.7.0 (Oct 7, 2025) * OCaml-LSP 1.24.0 (Oct 4, 2025) * Merlin 5.6-503 and 5.6-504 (Oct 4, 2025) * OCaml-LSP 1.23.1 (Oct 3, 2025) * Ppxlib 0.36.2 (Oct 1, 2025) * ocp-indent 1.9.0 (Oct 1, 2025) * opam-publish 2.6.0 (Sep 19, 2025) * Dune 3.20.2 (Sep 10, 2025) Unstable Releases: * First release candidate for OCaml 5.4.0 (Sep 29, 2025) * Second beta release of OCaml 5.4.0 (Sep 9, 2025) OCaml Compiler OCaml 5.4.0 Stable Release The October 9, 2025 release of OCaml 5.4.0 represents a major milestone with significant language enhancements. After two beta releases and a release candidate in September, the stable version delivers: Language Features: * Labelled tuples: Enable better documentation and type safety with labels on tuple fields let ( * ) (x,~dx) (y,~dx:dy) = x*.y, ~dx:(x *. dy +. y *. dx) * Immutable arrays ('a iarray): Covariant arrays for safer concurrent programming * Unified array literal syntax: [| ... |] now works for 'a array, 'a iarray, and floatarray * Atomic record fields: New [@atomic] attribute with Atomic.Loc submodule for lock-free concurrent access Standard Library Additions: * Pair: Utility functions for pairs * Pqueue: Priority queue implementation * Repr: Explicit functions for physical equality and comparison * Iarray: Operations on immutable arrays Runtime Improvements: * Frame pointers support for ARM64 (Linux and macOS) * Performance fix for Apple Silicon (using stlr instead of dmb ishld; str) * Software prefetching for ARM64, s390x, PPC64, and RISC-V * Restored "memory cleanup upon exit" mode The September beta releases and release candidate demonstrated the maturity of the release, with only minor TSAN and metadata fixes needed. WIP: Relocatable OCaml Work on Relocatable OCaml is progressing toward inclusion in OCaml 5.5, with implementation PRs opened by David Allsopp in September. The changes are undergoing review from Samuel Hym, Jonah Beckford, and others. What Relocatable OCaml Enables: This feature allows the OCaml compiler and its associated tools to be moved to different filesystem locations after installation without breaking functionality. Key benefits include: * Binary distributions that work regardless of installation path * Improved flexibility for package managers organizing OCaml installations * Bundling of specific OCaml versions by developer tools without path conflicts * Simplified cross-platform distribution Current Status: The implementation is in active review with ongoing responses to feedback. The core development team is likely to review the changes at an upcoming meeting, targeting inclusion in OCaml 5.5. For technical details about the implementation approach and its implications for the ecosystem, see David Allsopp's blog post on Relocatable OCaml and the associated Discuss thread. Build System Dune Dune 3.20.2 (September 10, 2025) provides bug fixes and stability improvements for the 3.20 series. Experimental: Dune Package Management We keep exploring: * Portable External Dependencies: An approach for storing system package dependencies in a platform-agnostic format, allowing projects to maintain a single specification that resolves correctly across Linux, macOS, and Windows environments, ensuring consistent builds regardless of platform-specific package naming and versioning differences. * Portable Lock Directories: Lock directories that work consistently across different operating systems and architectures, addressing the current limitation where platform-specific dependency resolutions prevent teams from sharing lock files through version control in heterogeneous development environments. * Lock Directories as Build Targets: Currently, the solver that comes up with a set of compatible dependencies needs to be run by the user explicitely (using dune pkg lock), but in the future we intend to create build plans implicitly via Dune build rules. This should make make package management simpler to use as it requires fewer user actions and does not require putting verbose lock directories into the project source directories. This change also paves the way for automatic relocking when dependencies change, including in watch mode. These features remain under active development and should not be relied on in production. However, we encourage cautious adoption of Dune Package Management itself for users comfortable with bleeding-edge tools that may still change. Dune package management is available in the stable release of Dune, as an experimental feature. Dune Maintained by: Rudi Grinberg (@rgrinberg, Jane Street), Nicolás Ojeda Bär (@nojb, LexiFi), Marek Kubica (@Leonidas-from-XIV, Tarides), Ali Caglayan (@Alizter, Tarides), Etienne Millon (@emillon), Stephen Sherratt (@gridbugs, Tarides), Antonio Nuno Monteiro (@anmonteiro), Etienne Marais (@maiste) Package Management opam-publish We celebrate two releases of opam-publish: opam-publish 2.6.0 (September 19, 2025) and opam-publish 2.7.0 (October 7, 2025). These releases make it easier to automate package publishing, particularly benefiting projects with continuous deployment pipelines. Maintained by: Raja Boujbel (@rjbou, OCamlPro), Kate Deplaix (@kit-ty-kate, Ahrefs) Editor Tools Roadmap: Edit / (W19) Navigate Code OCaml-LSP Server and Merlin September and October saw significant updates to editor support: Stable Releases * OCaml-LSP 1.24.0 (October 4, 2025): Major release with improved project navigation and performance optimizations * OCaml-LSP 1.23.1 (October 3, 2025): Bug fix release * Merlin 5.6-503 and 5.6-504 (October 4, 2025): Support for OCaml 5.3 and 5.4 with performance improvements Experimental: Merlin with Domains and Effects The experimental Merlin branch using domains and effects offers potential performance improvements through parallelization. This experimental version is available for testing but not recommended for production use. ocp-indent ocp-indent 1.9.0 (October 1, 2025): Updates for OCaml 5.4.0 compatibility and improved formatting rules. Experimental: ocaml.nvim Tarides announced ocaml.nvim, a new Neovim plugin for OCaml development. This experimental plugin serves as the Neovim counterpart to ocaml-eglot, leveraging LSP for modern editor features. OCaml LSP Server maintained by: Ulysse Gérard (@voodoos, Tarides), Xavier Van de Woestyne (@xvw, Tarides), Rudi Grinberg (@rgrinberg, Jane Street) Merlin maintained by: Ulysse Gérard (@voodoos, Tarides), Xavier Van de Woestyne (@xvw, Tarides), Muluh Godson (@PizieDust, Tarides), Documentation and PPX Tools Ppxlib Ppxlib 0.36.2 (October 1, 2025): Compatibility updates for OCaml 5.4.0 and fixes for AST handling. Maintained by: Nathan Rebours (@NathanReb) Gospel Ecosystem (Experimental) The Gospel formal specification ecosystem now offers tools for experimental specification-driven testing, as detailed in "Gospel Ecosystem: Tools Ready to Try, Language Evolving". Available Tools: * Ortac/QCheck-STM generates property-based tests from Gospel specifications written in .mli files. The tool won the TACAS 2025 Best Tool Paper award and can automatically produce comprehensive test suites from formal specifications. While the underlying Gospel language syntax may still change, the testing workflow is stable enough for experimental use in development environments. Current Status: The tools work well for isolated modules where you can write specifications and generate tests, but the Gospel language itself remains under active development with potential breaking changes ahead. Teams using these tools should be prepared to update specifications as the language evolves. This makes the ecosystem suitable for greenfield projects, experimental codebases, or well-isolated components where specification changes won't cascade through large systems. Platform Infrastructure OCaml Security Response Team The establishment of the OCaml Security Response Team (October 3, 2025) marks an important step in ecosystem maturity. The team will handle security vulnerabilities following established disclosure practices. OCaml.org Reorganization The newly introduced separation of OCaml Changelog and Backstage OCaml provides clearer communication: * OCaml Changelog: Official stable releases and production-ready updates * Backstage OCaml: Experimental releases, work-in-progress, and development opportunities This helps readers distinguish more easily between what's ready for production use and what's still experimental. Community Events FUN OCaml 2025 The FUN OCaml conference took place on September 15-16, 2025 in Warsaw, Poland, featuring talks on practical OCaml development, industry applications, and community projects. The FUN OCaml 2025 program and speaker lineup showcases the diverse ecosystem of OCaml in production. Video recordings of all presentations will be available soon for those who couldn't attend in person. OCaml Workshop 2025 The OCaml Users and Developers Workshop was held on October 17, 2025 in Singapore, co-located with ICFP/SPLASH, bringing together researchers and practitioners. You can find the list of presentations and a link to the video recordings on the OCaml Workshop 2025 page on OCaml.org! --- We're pleased to see the successful release of OCaml 5.4.0, marking a significant milestone with labelled tuples, immutable arrays, and atomic fields. The establishment of the Security Response Team and the reorganization of OCaml.org demonstrate the ecosystem's growing maturity. The clear separation between stable releases and experimental work helps the community make informed decisions about tool adoption. While experimental features in the Dune Developer Preview, ocaml.nvim, and Gospel ecosystem show promising directions, they remain in testing and should not be used in production. As always, we encourage feedback and contributions from the community as we continue to improve the OCaml Platform ecosystem.
dlvr.it
November 6, 2025 at 9:20 PM
OCaml Infrastructure: How the opam-repository Works
The opam repository serves as the central package registry for the OCaml ecosystem, hosting over 4,500 packages and processing nearly 200 new packages and releases each month. Understanding how this critical infrastructure works is essential for any OCaml developer looking to contribute packages or understand the ecosystem's inner workings. Architecture and Infrastructure The opam repository operates as a curated Git repository containing package metadata rather than the packages themselves. Each package is described by an opam file that specifies dependencies, build instructions, and other metadata. The package also includes a URL pointing to the source of the actual package. The actual source code remains in the original repositories maintained by package authors. For example, the yojson.3.0.0 package provides a simple illustration of the package format. For more details, see the opam package format documentation. The CI Pipeline At the heart of the repository's reliability is an extensive continuous integration (CI) system built around OCurrent, which powers the opam-repo-ci service. When you submit a pull request to add or update a package, this system: * Validates package metadata using an extensive set of linting rules * Tests compilation across multiple OCaml compiler versions (currently supporting back to OCaml 4.08) * Verifies installation on various platforms including Linux distributions, macOS, FreeBSD, Windows, and multiple CPU architectures (x86_64, ARM64, ARM32, PowerPC, s390x, RISC-V) * Runs package tests to ensure functionality * Checks reverse dependencies to ensure your changes don't break existing packages that depend on your package This comprehensive testing matrix helps maintain the repository's high quality standards. Windows support was added in 2024, marking a significant expansion of the platform coverage. Supporting Infrastructure The opam repository integrates with several other OCaml infrastructure services: * Docker Base Images: The docker-base-images service provides consistent testing environments, building official images for various Linux distributions, OCaml versions, and architectures * Documentation CI: The docs.ci.ocaml.org service automatically builds and publishes package documentation to the OCaml.org website's package area * Health Check Services: Multiple services continuously monitor package installability across different platforms and compiler versions: * check.ci.ocaml.org: Tests all packages regularly * dune.check.ci.dev: Tests packages with the Dune build system - related to the recent addition of the Dune Package Management feature * windows.check.ci.dev: Windows-specific testing * freebsd.check.ci.dev: FreeBSD compatibility * oxcaml.check.ci.dev: Tests with OxCaml compiler variant Infrastructure Funding As of 2025, the OCaml.org infrastructure is primarily funded and supported by the Cambridge Computer Lab and Tarides. Additional cloud hosting costs are covered by community contributions. For architecture-specific testing, Oregon State University Open Source Lab provides essential PowerPC infrastructure support, IBM LinuxONE at Marist University provides S390 machines for the CI pipelines, and Jane Street has generously donated x86 machines to Cambridge University. This combination of institutional support, corporate sponsorship, and community backing enables the comprehensive multi-platform testing that ensures package quality across the entire OCaml ecosystem. Governance and Curation Policies The opam package repository is a commons rather than a publishing platform: it is manually curated, so not all packages submitted for publication are accepted; it is maintained communally, so anyone can suggest changes to any package. Core Principles The repository maintains quality through several key policies, documented in the repository policies. The policies are derived from some core principles, including: Package Utility: Packages must provide substantial utility to the OCaml community. Single-function modules or packages with minimal functionality are generally rejected to preserve namespace and repository efficiency. Naming and Security: Package names are reviewed to prevent confusion with existing packages and potential security risks. Name squatting and packages with deceptively similar names to established libraries are not permitted. Dependency Constraints: The repository discourages overly strict version constraints (using = or
dlvr.it
November 5, 2025 at 6:32 PM
OCaml Weekly News
Alistair O'Brien announced Hi everyone 👋 We (@giltho and myself) are happy to announce the first OCaml meetup in London (Caml in the Capital)! Think of it as the British cousin of OCaml Users Meetup in Paris (OUPS). Caml in the Capital is an informal evening of talks, demos, and hacking from anyone working with or interested in OCaml. The goal is to create a friendly local space for sharing ideas, showing off projects, and connecting with other OCaml developers in the UK. When? We’re aiming for February 2026. Please fill out this short poll to help us pick a date: 👉 Doodle poll link Options: Thu 5th Feb, Thu 12th Feb, Thu 19th Feb, Thu 26th Feb The meetup will take place in central London (venue TBA — likely Imperial College), starting around 6:30pm and running until 8:30pm, with informal drinks and discussions afterwards. What’s the Fmt? A mix of: Workshop-style talks – anything from an accessible introduction of your work or research, a deep dive into your library, a live demo, or a tutorial. Hacking / discussions Call for presentations? If you’d like to give a talk, please message me or @giltho directly with: A title and short abstract Expected time slot Once we confirm the first date, we’ll: Confirm the programme and publish a new forum post Setup website, a Zulip channel, and a Meetup page for registration Looking forward to meeting more OCaml users in person! – Alistair & Sacha Ppxlib: Support for future compilers Archive: https://discuss.ocaml.org/t/ann-ppxlib-support-for-future-compilers/17430/1 Nathan Rebours announced Handling future AST changes in ppxlib The OCaml 5.2 compiler release has introduced changes in core parts of the AST types. Reflecting those changes when we bumped the internal AST used by ppxlib in 0.36.0 caused breakage in a lot of reverse dependencies. Despite our efforts to keep the ecosystem up to date, it has lead to a split in the opam universe between packages that are compatible with 0.36.0 and above and those that aren't. Looking at the 5.3 and 5.4 AST changes, we cannot reasonably keep the same "update the universe" approach going forward I would like to propose a slightly different but much more stable and sustainable approach. I think it's important to have a bit of context on why ppxlib is designed the way it is and how we've been handling new compiler releases over the past few years to understand this new approach and how it's going to improve the situation. The next section of this post will summarize this. If you're already familiar with ppxlib's history and design choices, please skip ahead to the [Proposed Approach section](#proposed-approach-for-53-onward). Ppxlib and compiler releases: How it works today Ppxlib internal AST Before ppxlib there was ocaml-migrate-parsetree. OMP had the advantage of providing a stable API for ppx authors. Each ppx would select a fixed version of the AST and be implemented as a full AST rewrite, i.e. a structure -> structure or signature -> signature function. This had the advantage of making ppx-es forward compatible as omp maintainers would add support for new compiler releases in the form of a new module containing the AST types for this version and migration functions to convert to/from the types matching the previous compiler version. OMP also came with a ppx driver, i.e. a program in charge of applying a set of ppx-es on a given AST or source file and spit out the final preprocessed AST for the compiler. The driver was responsible for migrating the AST from the compiler's version to the one used by a ppx. Because each ppx could require a different AST version, it also potentially had to migrate the AST transformed by a ppx before it passing it on to the next one. This had a few disadvantages though: poor performance as the AST was traversed and migrated (i.e. copied) several times through the course of a single driver run. transformations semantic issues: the order in which ppx-es were applied was uncertain or rather tied to the set of ppx-es version used. That meant that updating one ppx could change its "turn" and result in a different AST returned by the driver. This also did not allow ppx-es to interact together reliably. ppxlib aimed at fixing those issues by forcing ppx-es to agree on the AST version to use. ppxlib provides its own, fixed AST version that ppx-es have to use. Its driver handles the migration to/from the current compiler and provides a smooth API to write transformations as rewriting rules. The driver then handles the AST rewrite by recursively applying those rules in the right places in a single AST traversal. Support for new compilers Support for new compilers comes in two stages. Build and preprocess old code with new compiler This is the most basic support, that is making sure that one can still build and preprocess its code using the newest compiler, provided they don't use any of the new language features. To do this, we add the new AST types and migration functions, just as OMP used to do. This does not allow new features in the code because those cannot be represented with the old AST types and the migration would fail (This was also an existing limitation of OMP). This is usually released early on, when the compiler is still in beta and is a non breaking change, all reverse dependencies still build with this new version. Support new language features To support new language features, we bump the AST used by ppxlib. This means new features don't have to be migrated anymore and are therefore supported. This does change types that are exposed as part of ppxlib's API and can cause breakage in reverse dependencies, depending on which part of the AST were modified and which part each individual ppx uses explicitly. We provide tools that can help make ppx code more robust as they allow matching over and producing AST nodes without explicitly referencing the types themselves: metaquot, Ast_builder or Ast_pattern for instance. That's not always enough though and eventually, those ppx-es have to be updated to be compatible with the latest version of ppxlib. As was the case for the 5.2 AST bump, when we release such a ppxlib version, we send PRs to help maintainers of our opam reverse dependencies update and carefully add upper bounds to the versions that aren't compatible anymore. This worked pretty well for a few years as the AST was relatively stable and the parts that were modified were not directly used by a lot of ppx-es. A problem with this approach is that even though we can help maintainers go through the update, we cannot release packages in their stead which means that unmaintained ppx-es aren't compatible anymore no matter how much effort we put into easing the upgrade. It is also often the case that not all ppx-es have a compatible release straight away and this results in a transition period with the opam universe split mentioned in the introduction. Proposed approach for 5.3 onward The first part of this plan is to freeze ppxlib's internal AST for each major versions. That means that until we release ppxlib.1.0.0 our internal AST will always be the 5.2 AST. The second and most important part is to provide complete forward compatibility despite the AST freeze. We will allow migrating new features down to our AST by encoding them inside specific language extensions and migrating them back to their original form before returning the preprocessed AST to the compiler. This will allow existing ppx-es to be used with new compilers AND to be used in the same files as new language features as long as they don't have to directly interact with them without being updated in any way. We will also provide a stable API to allow ppx-es that would like to add special support for these new features to build and match over such nodes. You can take a look at the examples below to get an idea of what that would look like for recent language features such as the [effect syntax](#effect-syntax-example) from OCaml 5.3 or the [bivariance annotation](#bivariant-type-parameter-example) from OCaml 5.4. As part of these changes, we will deprecate ppxlib's copy of Ast_helper in favor of Ast_builder, aiming to remove Ast_helper entirely in 1.0.0. We have been maintaining two distinct modules for quite a while now. Ast_helper also has a tendency to encourage its users to generate all their code with Location.none as their location which makes the life of their users a bit hard when they have to interpret compiler errors. This can be seen as a middle ground between the approach proposed here 6 years ago (that we gave up on due to its complexity) and the current situation. Limitations Encoding new features into extension points is not always easy, only specific parts of the AST can be replaced by an extension point. To keep things under control and prevent ppx-es from generating inconsistent nodes, all new features will always be migrated into an extension point. That means that if the impacted node cannot directly be encoded that way, we will encode the first suitable parent node. In some scenarios, that can climb up the AST types quite significantly, potentially all the way to the structure_item~/~signature_item. This means that new features won't be equal when it comes to how easy it is to use them in conjunction with some ppx-es. It's important to keep in mind that this is still a net improvement as it was previously not possible to use them together at all. Similarly, providing a nice API to allow building and destructing encoded new features will vastly depend on the features themselves and how entangled they are with new AST types. We will likely not always expose such builder/destructor pairs and might only add some of them if the demand is high enough. It is also part of the reason why we will probably still bump our AST at some points in time even if much less frequently than we have in the past. When that eventually happens, we will be able to maintain the previous major versions for quite a while as this will just be a matter of adding our newest migrations there as well. Effect syntax example OCaml 5.3 introduced the following syntax: match f () with | v -> Complete v | effect (Xchg msg), k -> ... This special effect pattern is represented in the 5.3 AST with the Ppat_effect variant: We cannot represent this in the 5.2 AST and previously, any attempt at migrating such a node down would have failed. With this new approach we instead migrate it to something along those lines: [%ppxlib.migration.ppat_effect? (Xchg msg, k)] and the upward migration knows to translate this to the right Ppat_effect node. This migration needs to work without context outside the extension so that any ppx that would unknowingly copy such a node elsewhere in the AST would not cause an uninterpreted extension error later on during the compilation. If this is passed down to an existing ppx as part of its payload and it tries to interpret it, it should fail as it won't know what to do with such an extension. Note that ppx authors should never rely on the actual extension point encoding, we reserve ourselves the right to change that encoding as part of minor or patch releases of ppxlib. Such nodes should be left untouched or dealt with using the stable API described below. Now if a ppx author needs to add explicit support for effects they will be able to use something like: val ppat_effect : loc: location -> pattern -> pattern -> pattern from Ast_builder to generate such a node. Of course if your ppx generates an effect pattern with an older compiler, this will lead to a compile error as the extension won't be translated unless migrated back up. Authors will have to be mindful of this and properly document when/how they'll generate newer nodes and eventually restrict their ppx to the right range of compilers. These will likely come with a "destruct" version in Ast_pattern. For the effect pattern it should look like: val ppat_effect : (pattern * pattern, 'a, 'b) t -> (pattern, 'a, 'b) t Bivariant type parameter example This example is probably a bit of a stretch as it is a very niche syntax change and is highly unlikely to actually be used in the wild, but it makes a good example of a feature that is hard to encode. In OCaml 5.4, a new variant was added to the Asttypes.variance type: Bivariant. The variance type is used in the AST to describe how a type parameter behaves relative to the type itself. This can be manually annotated for each parameter when writing a type declaration or a class. The Bivariant case is a bit of a special one as a parameter can only be Bivariant (i.e. covariant AND contravariant) with the type if it does not actually appear in the concrete type definition, that is in cases such as: For reasons that we won't expand upon here, 5.4 introduced the following syntax to allow one to explicit annotate a parameter as bivariant: The problem is that the variance cannot be replaced directly by an extension point, see the type type_declaration for instance: and type_declaration = { ptype_name: string loc; ptype_params: (core_type * (variance * injectivity)) list; ^^^^^^^^ (** [('a1,...'an) t] *) ptype_cstrs: (core_type * core_type * Location.t) list; (** [... constraint T1=T1' ... constraint Tn=Tn'] *) ptype_kind: type_kind; ptype_private: private_flag; (** for [= private ...] *) ptype_manifest: core_type option; (** represents [= T] *) ptype_attributes: attributes; (** [... [\@\@id1] [\@\@id2]] *) ptype_loc: Location.t; } In this example we have to encode the entire parent node of the type declaration as an extension point. This means that it spreads in quite a few places, type_declaration can be found in structure_items, signature_items and inside some module_type nodes as well. Given there's very little to no use for this syntax, we won't be providing any function to build or destruct such nodes initially. Miou, a simple scheduler for OCaml 5 Archive: https://discuss.ocaml.org/t/ann-miou-a-simple-scheduler-for-ocaml-5/12963/17 Calascibetta Romain announced I am delighted to announce the release of Miou version 0.5.0. This release now uses poll(2)~/~ppoll(2) instead of select(3P) in order to improve I/O management performance. Since I/O management is decoupled from the scheduler, this does not change the Miou API or the miou.unix library. I would particularly like to thank @backtracking for allowing us to integrate part of his bitv library under a different licence, as well as @haesbaert, the original author of ocaml-iomux, for allowing us to use poll(2)~/~ppoll(2). This has allowed us to go further, particularly with vif, our web framework for OCaml 5, and our website builder-web has been completely rewritten to move to OCaml 5 (thanks to @reynir and @yomimono who participated in this rewrite and provided important feedbacks). This release comes with a new package, flux (still experimental), offering streaming abstractions that can be used with Miou. I would like to thank @rizo for his sketch streaming in this regard (pre-OCaml 5). This library takes advantage of the parallelism offered by Miou (with Miou.call) as well as resource management and finalisers (with Miou.Ownership). A tutorial is available here to create a tiny curl with a loading bar. Finally, we are continuing to lay the groundwork for the development of unikernels with mkernel. We are currently experimenting with three unikernels: immuable, which reuses Vif to create websites in OCaml 5 in the form of unikernels chaos (still at a very experimental stage), which aims to be an NTP server dns-resolver, which is a DNS query resolver in the form of a unikernel Finally, we would also like to thank everyone who has been involved in the development of Miou and its related ecosystem, whether directly or indirectly. Happy hacking! Cmarkit 0.4.0 - CommonMark parser and renderer for OCaml Archive: https://discuss.ocaml.org/t/ann-cmarkit-0-4-0-commonmark-parser-and-renderer-for-ocaml/17435/1 Daniel Bünzli announced Hello, It's my pleasure to announce a new release of cmarkit, an ISC-licensed CommonMark parser and renderer for OCaml. This release provides support for the latest version of the CommonMark specification, updated data for Unicode 17.0.0, a notable semantic change in the task item extension (thanks to @samoht) and a couple of bug fixes and improvements mostly in the CommonMark renderer. All the details are in the release notes. Thanks to everyone who reported issues. This release is brought to you by essential funding from the OCaml software foundation and my donors. P.S. I'm surprised by the number of users (or rather, dissatisfied users :–) of the CommonMark renderer. If you are using it don't hesitate to tell how/why you are using it in this thread, just curious :–) OCaml library for Timeplus Proton timeseries streaming database Archive: https://discuss.ocaml.org/t/ann-ocaml-library-for-timeplus-proton-timeseries-streaming-database/17440/1 Michael Freeman announced A high-performance, feature-rich OCaml driver for Timeplus Proton - the streaming database built on ClickHouse. Book draft: "Control structures in programming languages" Archive: https://discuss.ocaml.org/t/book-draft-control-structures-in-programming-languages/17443/1 Xavier Leroy announced I am happy to announce that a draft of my upcoming book "Control structures in programming languages: from goto to algebraic effects" is now available at https://xavierleroy.org/control-structures . The book compares several programming languages from the standpoint of control structures. OCaml is used intensively to discuss control in functional programming, including continuation-passing style, control operators, exceptions, user-defined effects and effect handlers, with many examples that I hope you'll like. The book also discusses in depth a number of questions that are often raised in this forum, such as the theory and practice of algebraic effects and handlers, and the static checking of exceptions and effects. Enjoy! oplot 0.85 - mathematical plotter Archive: https://discuss.ocaml.org/t/ann-oplot-0-85-mathematical-plotter/17444/1 sanette announced Hello I’m happy to announce a new version of oplot, a library for plotting mathematical functions, using openGL by default for fast rendering and animations, but also providing high quality vector graphics exports. This version has a new feature that math lovers will appreciate: implicit_curve plotting! For instance do you want to know what the solutions to the equation (x²+y²-1)³ - x² y³ = 0 look like? Here is the result: If you already dug into the problem of plotting implicit curves you know that it’s sometimes very difficult to localize in advance the various singularities of the curve. oplot gives you 3 ways of tuning the computation: grid size, recursive grid size for subsampling where the curvature of the curve seems high, and control over the iterations of the Newton method. There is also a pole detection, where the function changes sign but probably still doesn’t have a zero there. You can obtain debug information for any curve, for instance here you see the default parameters automatically detected for the above curve: initial grid (green) and subsampling (cyan): oplot is available in opam, doc is here. QCheck 0.27 Archive: https://discuss.ocaml.org/t/ann-qcheck-0-24/16198/4 Jan Midtgaard announced QCheck 0.27 is now available from the opam repository :partying_face: https://github.com/c-cube/qcheck/releases/tag/v0.27 The 0.27 release is focused on improving the float shrinking support and also contains a small patch to make the package compile with OxCaml: Add QCheck.Shrink.float and enable shrinking for QCheck.float Add QCheck.Shrink.float_bound and enable shrinking for QCheck.float_bound_inclusive and QCheck.float_bound_exclusive Add QCheck.Shrink.float_range and enable shrinking for QCheck.float_range Enable shrinking for QCheck.{pos_float,neg_float,exponential} Patch QCheck.Print.float and QCheck2.Print.float to print negative nans consistently as "-nan" also on Windows and macOS, and correct documentation for QCheck.{float,pos_float,neg_float} in that they may produce ~nan~s since #350 from 0.26 Eta-expand a couple of partial application to compile under OxCaml Happy testing! :smiley: Bytesrw 0.3.0 – The cryptographic edition Archive: https://discuss.ocaml.org/t/ann-bytesrw-0-3-0-the-cryptographic-edition/17450/1 Daniel Bünzli announced Hello, It's my pleasure to announce a new release of the bytesrw set of ISC licensed libraries. Bytesrw extends the OCaml Bytes module with composable, memory efficient, byte stream readers and writers compatible with effect-based concurrency. Optional support for compressed, hashed and encrypted bytes depend, at your wish, on the C zlib, libzstd, blake3, libmd, xxhash and mbedtls libraries. This release adds optional libraries to support for SHA-3 hashes, cryptographically secure pseudo-random bytes streams, TLS encrypted byte stream and low-level support for cryptographic operations on slices: Bytesrw_sysrandom provides pseudorandom byte streams and entropy directly sourced from your operating system primitives. Bytesrw_crypto.Psa provides low-level cryptographic operations on byte slices via thin and safe bindings to the TF-PSA-Crypto C library distributed with Mbed TLS. This library is an implementation of the PSA Crypto API Specification. Its design is particularly suited if you care about key materiel not being seen by the OCaml GC (implementations also allow further degrees of isolation as can be read in the API's design goals). Besides the API is nicely and thoroughly documented. It is quite bureaucratic to use but that's what you likely want from a cryptographic library (e.g. key usages have to be declared upfront and are checked at runtime by cryptographic operations). Bytesrw_crypto (will) provides a few higher-level operations implemented over PSA. The module is rather shallow at the moment, more will be added in the future as we abstract over our usage of PSA Crypto. For now it mostly contains an API to access the hashes provided by PSA Crypto in the way other bytesrw hashing modules expose their hashing service. This notably provides the SHA-3 family of hashes which were not previously available in the set of optional bytesrw libraries. Bytesrw_tls provides support for TLS encrypted streams and the needed X.509 certificate management (including system lookups for trusted CAs). The backend is provided by the Mbed TLS C library. For now these streams are instantied over blocking fds, but this restriction will be lifted in the future. I also added a little tool called certown which you may find handy for dealing with certificates for localhost when you develop servers. Note that the binding to PSA cryptography has been used to implement a few things (e.g. the horrific passkeys specification) but has not run in production yet. However the binding is pleasantly unsophisticated, the underlying C API is straightforward to bind to. See the release notes for details about other changes. This release was made possible thanks to a grant from the OCaml software foundation and to my donors. Docs: https://erratique.ch/software/bytesrw/doc (or odig doc bytesrw) Install: opam install bytesrw conf-… (opam pr) P.S. Libraries that depend on Mbed TLS need the recent 4.0.0 version which is quite fresh and may take a bit of time to trickle in system package managers. If you trust me you can use my distribution crutch opam repository to install it.
dlvr.it
November 5, 2025 at 3:37 PM
OCaml Weekly News
Hello opam 2.5.0~alpha1 Kate announced Hi everyone, We are happy to announce the first alpha release of opam 2.5.0. This version is an alpha, we invite users to test it to spot previously unnoticed bugs as we head towards the stable release. What’s new? Some highlights: :high_speed_train: Speed up opam update up to 70%. Thanks to @arozovyk, opam update now loads opam files 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 from the file system 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 infinite loop when opam asks users to ensure they source their .bashrc file in 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 version. (#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: bash -c "sh <(curl -fsSL https://opam.ocaml.org/install.sh) --version 2.5.0~alpha1" or from PowerShell for Windows systems Invoke-Expression "& { $(Invoke-RestMethod https://opam.ocaml.org/install.ps1) } -Version 2.5.0~alpha1" Please report any issues to the bug-tracker. Happy hacking, <> <> The opam team <> <> :camel: Release of Fmlib 0.6.0 Archive: https://discuss.ocaml.org/t/ann-release-of-fmlib-0-6-0/17412/1 Helmut announced I have the pleasure to annouce the release of version 0.6.0 of fmlib. The main components of fmlib are Web Applications in the Elm style Pretty Printing Combinator Parsing Documentation see https://hbr.github.io/fmlib/odoc/index.html. This release is mainly focussed on pretty printing and web applications. The new release has some breaking changes because some function names or function arguments have changed. The breaking changes can be easily fixed by looking into the documentation which contains all functions and the corresponding arguments. Web applications: Single page applications are now fully supported. I.e. it is possible to manage several virtual pages in one application. The switching between the pages can be done by accessing the browser history. I.e. the user is capable of pressing back and forward buttons and the application remains the same. For an introduction to single page applications see here. An example of a single page application can be seen here. Web applications can contain reference elements. These can be used to optimize applications with really big doms (e.g. several hundreds or thousands of elements). Introduction to reference elements see here. A simple spreadsheet implemented as a web application can be found here. Files on the local machine can be selected and loaded into the application. Session and local storage of the browser can be used. Pretty Printing: A new algorithm based on Phil Wadler’s design is used which makes the code more elegant, easy to read and fixes some bugs in the previous algorithm. The new algorithm is in a separate module Pretty. The old module Print is kept but will be removed in the next release. Combinator Parsing: As a convenience there are lexeme parsers which support languages with some standard syntax (like Haskell’s Parsec). Some bugfixes and minor additional functions. No breaking changes.
dlvr.it
October 29, 2025 at 2:38 PM
A Roundup of ICFP/SPLASH 2025 happenings
dlvr.it
October 26, 2025 at 2:36 AM
What I learnt at ICFP/SPLASH 2025 about OCaml, Hazel and FP
dlvr.it
October 25, 2025 at 10:33 PM
It's time to go post-POSIX at ICFP/SPLASH 2025
dlvr.it
October 25, 2025 at 6:34 PM
Jane Street and Docker on moving to OCaml 5 at ICFP/SPLASH 2025
dlvr.it
October 25, 2025 at 2:38 PM
Holding an OxCaml tutorial at ICFP/SPLASH 2025
dlvr.it
October 25, 2025 at 2:36 AM
Programming for the Planet at ICFP/SPLASH 2025
dlvr.it
October 24, 2025 at 10:29 PM
OCaml Weekly News
Archive: https://discuss.ocaml.org/t/ann-backstage-ocaml-ocaml-nvim-a-neovim-plugin-for-ocaml/17383/1 Charlène_Gros announced We’re excited to announce ocaml.nvim, a new Neovim plugin actively being developed by Tarides that brings advanced OCaml development features to Neovim users. Think of it as the Neovim sibling of ocaml-eglot, which we released earlier this year for Emacs users. What is ocaml.nvim? Modern code editors communicate with programming languages through the Language Server Protocol (LSP), which provides essential features like syntax checking, code navigation, and auto-completion. However, OCaml’s language server exposes powerful custom commands beyond what generic LSP clients can access. ocaml.nvim works alongside generic Neovim LSP plugins like nvim-lspconfig, providing direct access to advanced ocamllsp features without requiring complex editor-side logic. The plugin gives you access to all the advanced Merlin commands not supported by generic LSP clients. Key Features Typed Holes Navigation - Navigate between typed holes (_) and interactively substitute them with the Construct command. Semantic Navigation - Move through your code semantically: jump between expressions, parent let bindings, modules, functions, and match expressions. Phrase Navigation - Move between OCaml phrases (top-level definitions) in your buffer. Many more features are in development, including alternating between .ml and .mli files, type enclosing, and pattern matching generation. Getting Started Installation is straightforward with lazy.nvim: require("lazy").setup({ { "tarides/ocaml.nvim", config = function() require("ocaml").setup() end } }) The plugin complements your existing LSP setup—you’ll continue to use Neovim’s built-in LSP for standard features while ocaml.nvim adds OCaml-specific capabilities. Project Status The ocaml.nvim repository is now public on GitHub, with comprehensive documentation, a feature table, and screencast demonstrations. We’re working towards a stable 1.0 release and welcome feedback from the community. Try out ocaml.nvim and let us know what you think! For questions or feedback, you can post an issue on the ocaml.nvim GitHub repository. Ocaml notebooks in web browser Archive: https://discuss.ocaml.org/t/ocaml-notebooks-in-web-browser/17385/1 Davy announced Hello everyone ! I’m currently learning Ocaml, and found no better way to learn than working on a project : I’m happy to announce xeus-ocaml, a new kernel to run Ocaml from Jupyterlite notebooks :partying_face: I’m far from a professional developer, and very new to Ocaml, so do not hesitate to try it with your workflow, report any new issues, ask for other external libraries (currently only stdlib and ocamlgraph), or contribute to its development to make the code more robust and idiomatic. Any feedback would be appreciated!
dlvr.it
October 22, 2025 at 6:35 PM
CI support for OCaml 5.4
Following the release of OCaml 5.4 the CI systems need to be updated to use it.
dlvr.it
October 19, 2025 at 2:37 PM
OCaml Weekly News
opam-publish 2.7.0 Archive: https://discuss.ocaml.org/t/ann-opam-publish-2-7-0/17358/1 Kate announced Hi everyone, We are happy to announce the release of opam-publish 2.7.0 (and 2.6.0), which together brought the ability to more easily publish your releases automatically, thanks to @filipeom: A new OPAM_PUBLISH_GH_TOKEN environment variable and --token argument are now available to pass the GitHub token SSH keys aren't used to push the branch to the user's fork anymore. Instead the token we already require is used. If undefined, the git config variables user.name and user.email are automatically filled with the github username and username@opam-publish as a backup An example of the new automated setup can be found in this CI job. Other minor changes include: The addition of a message after the PR is open, to notify users that they can re-run opam-publish to update the PR. Thanks to @punchagan The switch from lwt_ssl to tls-lwt which avoid one dependency and avoid depending on the system libssl Happy publishing! <> <> The opam team <> <> :camel: OCaml.org: Introducing Backstage OCaml - Separate Feeds for Stable and Experimental Features Archive: https://discuss.ocaml.org/t/ocaml-org-introducing-backstage-ocaml-separate-feeds-for-stable-and-experimental-features/17359/1 Sabine Schmaltz announced We're pleased to announce that OCaml.org now has dedicated RSS feeds and pages for stable and experimental announcements, introduced in PR #3278! What's new: OCaml Changelog at ocaml.org/changelog — Official stable release announcements and updates from the OCaml compiler, OCaml infrastructure, and the OCaml Platform Tools Backstage OCaml at ocaml.org/backstage — Updates on experimental releases, work-in-progress, and opportunities to contribute to the development of the OCaml Platform and its infrastructure This separation helps keep the main changelog focused on production-ready releases while providing a dedicated space for those interested in experimental work, early testing, and contributing to OCaml's development. Both pages have their own RSS feeds, so you can subscribe to whichever matches your needs—or both! We welcome your feedback as we continue improving OCaml.org. LexiFi at FUN OCaml 2025 Archive: https://discuss.ocaml.org/t/lexifi-at-fun-ocaml-2025/17363/1 Nicolas Ojeda Bar announced Dear OCaml enthusiasts, LexiFi participated in this year's FUN OCaml that took place in Warsaw this past September 15 and 16. The event was a great success, thanks to the efforts of the organizers and the other participants. Hopefully the event will continue to take place and develop in the future. LexiFi both sponsored and contributed (two) presentations to the event: a 30-minute retrospective on 25 years of using OCaml at LexiFi, and a 2-hour workshop on implementing a toy version of our type-reflection extension to the compiler. If you are interested, we wrote a short blog post https://www.lexifi.com/blog/ocaml/fun-ocaml-2025/ where you will find the slides and the video for the 30-minute presentation, as well as the code and the slides for the 2-hour workshop (the video recording for this part is not yet available). Enjoy! Best wishes, Nicolas Introducing oui Archive: https://discuss.ocaml.org/t/introducing-oui/17364/1 Nathan Rebours announced At OCamlPro we're happy to announce our new ongoing project funded by the CEA-List: ocaml-universal-installer or oui! oui's goal is to help teams developping applications in OCaml to package them for their users outside the OCaml World by building binary installers for all major platforms: Linux, Windows and macOS. oui builds standalone installers: you just need to download and run the file. No need to install OCaml, Opam and to compile anything on the target system anymore. The tool will be used to package and distribute Frama-C and its plugins to non opam users. It is still in development but we'd like to present it to the community with the hope that it will prove helpful to you as well. How it works You take care of building your application and provide oui the list of your binaries and extra files you'd like installed alongside them and it will assemble an installer from those. It uses different tools and build different types of installers for all three main platfoms: on Linux, we build self extracting archives using makeself. on macOS, we build regular OSX installers using pkgbuild~/~productbuild We started oui on top of an older but very similar project: opam-wix. opam-wix was an opam plugin used to build a Windows MSI from a locally installed opam package. This feature, though not the core focus of the early development, is still available via opam-oui and will be extended with the ability to build installers for the other supported platforms. A tool for the community Though it is initially developped for Frama-C's distribution, both the CEA-List and ourselves at OCamlPro would like to make oui a community tool that can help open source OCaml developpers ship their applications easily. The goal of this early announcement is to gather data and feedback on other use cases for binary installers across the OCaml Ecosystem to help us shape oui into the right tool from the start. This is an ongoing project, if you'd like to follow the development, it is publicly hosted here. OCaml 5.4.0 released octachron announced We have the pleasure of celebrating the birthdays of Camille Saint-Saëns and Karl Schwarzschild by announcing the release of OCaml version 5.4.0. Some of the highlights of OCaml 5.4.0 are: Labelled tuples It is now possible to add labels on tuple fields let ( * ) (x,~dx) (y, ~dy) = x*.y, ~dx:(x *. dy +. y *. dx ) Those labeled tuples are equivalent to SML records: they are an ordered and structurally-typed variants of records. In particular this implies that partial pattern matching on tuples is only possible for labelled tuples with a known type: type t = float * dx:float let v (x_and_dx:t) = let (x,..) = x_and_dx in x Those types are mostly intended for local types where previous code was using tuples. Array literal syntax support for immutable arrays and ~floatarray~s The array literal syntax is now shared by array-like primitive types, like 'a array, floatarray and immutable array iarray. For instance, this code let x = Float.Array.of_list [0.;1.;2.] can now be written let x : floatarray = [|0.; 1.; 2.|] This also supported in patterns let one = match x with | [|_;y;_|] -> Some y | _ -> None However array indexing still needs to go through user-defined indexing operators let (.$()) = Float.Array.get let (.$()<-) = Float.Array.set let () = x.$(0) <- x.$(1) Immutable arrays Along with shared array literals, OCaml 5.4 adds support for immutable arrays. Immutable arrays are covariant in the type of their elements, it is thus possible to coerce immutable arrays with no costs at runtime: let i1: _ iarray = [|object method m = 0 end|] let i2 = ( i1 :> < > iarray) Atomic record fields It is now possible to mark a field of a record as atomic. Atomic operations on those fields require to use the new Atomic.Loc submodule after accessing the location with the [%atomic.loc ...] builtin extension. For instance, type 'a mpsc_list = { mutable head:'a list; mutable tail: 'a list [@atomic] } let rec push t x = let before = Atomic.Loc.get [%atomic.loc t.tail] in let after = x :: before in if not (Atomic.Loc.compare_and_set [%atomic.loc t.tail] before after) then push t x ... Moreover, it is forbidden to pattern match on atomic fields: let f { head; tail } = tail Error: Atomic fields (here tail) are forbidden in patterns, as it is difficult to reason about when the atomic read will happen during pattern matching: the field may be read zero, one or several times depending on the patterns around it. in order to make all reads on those atomic fields explicit. Four new standard library modules: Pair, Pqueue, Repr, and Iarray The standard library has been extended with four new modules: Pair: functions for working on pairs let ones = Pair.map_fst succ (0,1) Pqueue: priority queues, generic or not module Int_pqueue = Pqueue.MakeMin(Int) let q = Int_pqueue.of_list [4;0;5;7] let some_zero = Int_pqueue.pop_min q Repr: physical and structural equality, comparison function, more generically all functions dependent on the memory representation of values. let f = Repr.phys_equal (ref 0) (ref 0) Iarray: functions on immutable arrays let a = Iarray.init 10 Fun.id let b = Iarray.map succ a Restored "memory cleanup upon exit" mode This mode allows to restart many time the OCaml runtime in C-driven programs that interact with OCaml libraries. It is also useful to reduce noise when tracking memory leaks in C code running the OCaml runtime. To get around cancellation issues, the restored mode currently assumes that all domains are joined before exiting the OCaml runtime. A new section in the reference manual on profiling OCaml programs on Linux and macOS A new section in the reference manual explains how to use OS specific profiling tools to profile native OCaml programs. A lot of incremental changes: Many runtime and code generation improvements More than thirty new standard library functions Nearly a dozen improved error messages Around fifty bug fixes Please report any unexpected behaviours on the OCaml issue tracker and post any questions or comments you might have on our discussion forums. The full list of changes can be found in the full changelog. Editor note: please follow the archive link above for the installation instructions and the full changelog Happy hacking, Florian Angeletti for the OCaml team. OCaml compiler office hours Archive: https://discuss.ocaml.org/t/ocaml-compiler-office-hours/17230/16 Continuing this thread, gasche announced The meeting went well – see the collaborative pad for notes. I propose to have another meeting about a month from now: (I picked a different time slot from the current one, that also looks reasonable given previous poll results. If extra people would like to join, please feel free to participate to the time-slot poll in the first post so that I can tell when are good meeting times.) @giltho thanks for noticing the language issue on the online-meeting service I proposed; this is a new issue that looks like it comes from a version upgrade, it of course had a fine English interface when I adopted the service. Let's keep jitsi.meet for now. tutorial about compiling ocaml-5 on a ChromBook with Crostini Archive: https://discuss.ocaml.org/t/ann-tutorial-about-compiling-ocaml-5-on-a-chrombook-with-crostini/17368/1 Florent Monnier announced Hello dear list, I wrote another mini-tutorial to explain how to compile ocaml-5 on a chromebook with crostini: http://decapode314.free.fr/ocaml2/tut/tut-ocaml-5/tut-ocaml-5.html The trick to compile ocaml-5 in this environement was the same than to compile ocaml-4 in the same environement because ln -s doesn't seem to produce the expected result. At the beginning I edited the Makefile to replace the ln -s commands by cp commands, but an easier way is to use the make feature that permits you to change the value of one of the variable from the command line which invokes make, like this make LN=cp. With this trick everything was producing the expected ocaml tools with ocaml-4, but with ocaml-5, I have only been able to get ocamlnat and ocamlopt tools (which is enough.) ocamlopt was installed as expected by the make install command, but ocamlnat had to be copied by hand. If the command ocaml produces an error (cannot execute), in scripts I can still replace: #!/usr/bin/env ocaml by: #!/usr/bin/env ocamlnat By defining the same environement variables than opam I can get two different ocaml version usable at the same time, one 4 version, and a 5 version, next to each other at the same time, without using opam because opam grew up a lot, and in crostini environement we quickly lack of space. PS: If someone want to help finding how to get the ocaml and ocamlc commands functioning, the help will be wellcome, and I will update this mini-tutorial. dune-release-action: Automate your opam package releases with GitHub Actions Archive: https://discuss.ocaml.org/t/ann-dune-release-action-automate-your-opam-package-releases-with-github-actions/17380/1 David Sancho announced Hi everyone 👋 I'm excited to share a new GitHub Action I've been working on: dune-release-action If you maintain OCaml packages, you know the drill: every release involves a ritual of commands and manual steps. You need to: Ensure your CHANGES.md is properly formatted Tag your release Run dune-release lint + distrib + submit Create a GitHub release with the correct changelog section Check the opam-repository's PR Oh shit, github token is expired Create new token without expiration (??) Retry For me, was following this guide https://gist.github.com/anmonteiro/abd9275456888740758aa9f772d1992a by @anmonteiro, but it typically took around an hour per release. dune-release-action dune-release-action automates the entire release workflow in GitHub Actions. Push a git tag, and the action runs dune-release for you with: Handles all the dune-release orchestration Validates your changelog format (right tag exists, etc) Creates a GitHub release with proper description (from your changelog section (!!)) Submits a PR to opam-repository name: Release on: push: tags: - '*' permissions: contents: write pull-requests: write jobs: release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - uses: ocaml/setup-ocaml@v3 with: ocaml-compiler: 5.3.0 - run: opam install dune-release -y - uses: davesnx/dune-release-action@v1 with: package-name: 'your-package' github-token: ${{ secrets.GH_TOKEN }} This is very much a one-day half vibe-coded project and it's hard to test in many use cases, I'm sure there are edge cases and workflows I haven't considered. Documentation: https://github.com/davesnx/dune-release-action/blob/main/README.md Looking forward to hearing your thoughts!
dlvr.it
October 15, 2025 at 2:37 PM
Backstage OCaml: ocaml.nvim - A Neovim Plugin for OCaml
Discuss this post on discuss! We're excited to announce ocaml.nvim, a new Neovim plugin actively being developed by Tarides that brings advanced OCaml development features to Neovim users. Think of it as the Neovim sibling of ocaml-eglot, which we released earlier this year for Emacs users. What is ocaml.nvim? Modern code editors communicate with programming languages through the Language Server Protocol (LSP), which provides essential features like syntax checking, code navigation, and auto-completion. However, OCaml's language server exposes powerful custom commands beyond what generic LSP clients can access. ocaml.nvim works alongside generic Neovim LSP plugins like nvim-lspconfig, providing direct access to advanced ocamllsp features without requiring complex editor-side logic. The plugin gives you access to all the advanced Merlin commands not supported by generic LSP clients. Key Features Typed Holes Navigation - Navigate between typed holes (_) and interactively substitute them with the Construct command. Semantic Navigation - Move through your code semantically: jump between expressions, parent let bindings, modules, functions, and match expressions. Phrase Navigation - Move between OCaml phrases (top-level definitions) in your buffer. Many more features are in development, including alternating between .ml and .mli files, type enclosing, and pattern matching generation. Getting Started Installation is straightforward with lazy.nvim: require("lazy").setup({ { "tarides/ocaml.nvim", config = function() require("ocaml").setup() end } }) The plugin complements your existing LSP setup—you'll continue to use Neovim's built-in LSP for standard features while ocaml.nvim adds OCaml-specific capabilities. Project Status The ocaml.nvim repository is now public on GitHub, with comprehensive documentation, a feature table, and screencast demonstrations. We're working towards a stable 1.0 release and welcome feedback from the community. Try out ocaml.nvim and let us know what you think! For questions or feedback, reach out to Charlène Gros at charlene@tarides.com, join the discussion on the OCaml Discuss forum, or post an issue on the ocaml.nvim GitHub repository.
dlvr.it
October 14, 2025 at 4:31 PM
Upcoming OCaml Events
* OCaml Users and Developers Workshop 2025 // Singapore, Singapore // Oct 17, 2025
dlvr.it
October 14, 2025 at 2:38 PM
Gospel Ecosystem: Tools Ready to Try, Language Evolving
Gospel, the behavioral specification language for OCaml, is at an interesting inflection point. After years of development and research, some tools in the ecosystem—particularly Ortac/QCheck-STM—are ready for early adopters to try on real codebases. At the same time, Gospel itself is preparing a major release with breaking changes as the language design continues to evolve. Making Formal Methods Accessible Traditionally, formal verification delivers strong correctness guarantees but requires significant expertise and resources. Gospel's vision is different: one specification language that will eventually support multiple verification strategies, from lightweight runtime testing to full mathematical proofs. While the testing tools are available today, the proof tools are still under development. This approach follows a successful pattern established in other language ecosystems. ACSL (ANSI/ISO C Specification Language) provides a behavioral specification language for C programs that supports multiple verification tools including Frama-C, while JML (Java Modeling Language) offers a unified specification language for Java that can be used for runtime assertion checking, static analysis, and theorem proving. Similarly, Eiffel pioneered the concept of design by contract with specifications embedded directly in the programming language. Gospel brings this proven strategy to OCaml. Gospel provides a non-invasive syntax for annotating OCaml interfaces with formal contracts in special comments beginning with @, describing type invariants, mutability, pre-conditions, post-conditions, and exceptions. The specifications use logical models to represent abstract types—for example, modeling a queue as a mathematical sequence to specify how operations transform its contents. Status of Gospel and its Toolkit Gospel language (experimental, major changes coming) is preparing a release with significant breaking changes. Early adopters should expect the language to evolve and should not expect bug fixes in the current version. Gospel's tool-agnostic design powers an ecosystem of verification tools at different maturity levels: Ortac provides dynamic verification through runtime assertion checking and automated test generation: * Ortac/QCheck-STM (released, battle-tested) generates black-box state-machine tests and has found real bugs including missing bounds checks in varray, integer overflows causing segfaults in bitv, inconsistent behavior with zero-length vectors in bitv, and unexpected behavior in the standard library's Hashtbl.create. Supports higher-order functions like map. * Ortac/Wrapper (released, early stage) instruments functions with runtime assertions but hasn't been extensively tested in production yet. * Ortac/Monolith (experimental) provides fuzzing integration with Monolith. Cameleer (working toward first release) translates Gospel into Why3 for deductive verification using automated theorem provers. Peter (ongoing research) explores separation logic verification through CFML integration with Coq for complex heap manipulation proofs. Open Source Infrastructure Strategy Gospel development is funded by ANR grant ANR-22-CE48-0013, executed through collaboration between Nomadic Labs, Tarides, Inria, and LMF (Laboratoire Méthodes Formelles) at Université Paris-Saclay. The project demonstrates how open source can transform formal verification economics: rather than each organization independently funding expensive verification efforts, shared open tooling and verified libraries benefit the entire ecosystem. Current State and Integration Ortac/QCheck-STM is released and has proven effective on real codebases, with test runs completing in hundreds of milliseconds. Gospel itself is experimental with major language changes planned, so early adopters should expect breaking changes. The OCaml Platform roadmap through 2026 includes formal verification as a workflow goal. Currently, using Ortac requires writing Dune rules manually. Integration with Dune as a first-class feature requires further discussion and development. Try Ortac/QCheck-STM Today Install via opam: opam install ortac-qcheck-stm This installs the ortac command-line tool and everything needed to generate QCheck-STM tests from Gospel specifications. See the Ortac tutorial for a complete walkthrough, or check the QCheck-STM plugin README for details. The project welcomes early adopters who want to: * Try Ortac/QCheck-STM on production codebases and report bugs found * Provide feedback on Gospel's evolving specification language * Share use cases that could benefit from formal verification The VOCaL (Verified OCaml Library) project demonstrates Gospel's potential with formally verified data structures. What to Expect The verification infrastructure is already useful for testing — bugs are being found, specifications provide value as documentation. Work on establishing the path from testing to formal proofs is ongoing, but the proof tools aren't ready for general use yet. Learn More The ecosystem is open source and actively developed. Explore the Gospel GitHub organization, or review research papers: * GOSPEL — Providing OCaml with a Formal Specification Language (FM 2019) * Static and Dynamic Verification of OCaml Programs: The Gospel Ecosystem (ISoLA 2024) * Dynamic Verification of OCaml Software with Gospel and Ortac/QCheck-STM (TACAS 2025, Best Tool Paper award from ETAPS) For teams interested in specification-driven testing, Ortac/QCheck-STM is ready to try. For those interested in formal proofs or stable Gospel language features, watch the project but expect it will be some time before these are production-ready. Contact: @n-osborne | Get started: Ortac Tutorial | Documentation: Gospel docs
dlvr.it
October 14, 2025 at 1:21 PM
OCaml 5.4 Release: New Features, Fixes, and More!
An overview of the OCaml 5.4 update highlighting new features and bug fixes!
dlvr.it
October 11, 2025 at 6:34 PM