LexiFi's open-source contributions.

Alain Frisch

LexiFi contributes to open-source efforts in the OCaml community.

The sections below mention open-source projects in the OCaml community, either initiated by LexiFi or to which LexiFi engineers contributed significantly.


At LexiFi, we have been happily using OCaml for over two decades for the vast majority of our code base, including for symbolic processing, custom DSLs, “quant” code, user-interface, business logic, deployment system, infrastructure layers, and more. Our OCaml code runs on Linux, Windows and in the web browser.

And LexiFi contributes back to OCaml itself! Two engineers in our technical team are also part of the OCaml development team itself, and other colleagues occasionally contribute to OCaml as well.

Some contributions to OCaml from LexiFi engineers:

  • Language features: first-class modules, inline records, local exceptions.
  • Compilation and optimizations: better unboxing, local functions.
  • PPX infrastructure and attributes / extension nodes.
  • Improved support for Windows: flexdll, Dynlink, Unicode runtime.
  • RISC-V backend.
  • Stdlib: many additions.
  • Warnings: unused declarations, deprecation markers and alerts, mnemonic names.
  • Many bug reports, fixes, and participation to the general reviewing effort.

In addition to contributions to the OCaml code base, LexiFi has supported and continues to support OCaml in various ways:

  • As one of the first company adopting OCaml, we participated to establishing the viability of OCaml as an industrial language, particularly so because our business domain was far from the historical niches were functional languages were known to shine.

  • LexiFi was a founding member and sponsor of the OCaml Consortium and then of the OCaml Foundation.

  • We provided funding for interns to work with researchers around OCaml (e.g. for the initial implementation of GADTs).

  • We convinced some of our industrial clients to adopt OCaml for their own internal development (and to join the OCaml Consortium and Foundation).

LexiFi maintains an internal fork of OCaml, which has served in the past as a testbed for extensions then proposed for upstream inclusion.


Dune is a build system for OCaml which we use to build our code at LexiFi (following many productive years using OMake). We actively participate in its development, and have contributed many small improvements and features, e.g.:

  • support for “Dialects”;
  • building plugins from executables;
  • various extensions for the build DSL to make it more practical;
  • many improvements for Windows support;
  • instrumentation preprocessors (e.g. Landmarks or Bisect).


gen_js_api is a tool to automate the creation of OCaml bindings for JavaScript libraries, to be used with the js_of_ocaml compiler.

We use gen_js_api internally (to implement ocaml-vdom amongst other uses), but the tool has also grown to include features requested or contributed by the community.


ocaml-vdom is an implementation of the Elm architecture , where the UI is specified as a functional “view” on the current state.

The package also contains a binding to the browser’s DOM and other client-side APIs.

The vast majority of our web front-end is implemented with ocaml-vdom.


landmarks is a powerful yet easy to use profiling library for OCaml (measuring CPU cyles, allocated memory, etc). It provides primitives to delimit portions of code and measure the performance of instrumented code at runtime.

We use landmarks to track performance bottlenecks in our code base and focus our optimization efforts to relevant parts.


sedlex is an Unicode-friendly lexer generator for OCaml. It was initially created as an example of the new ppx technology.

sedlex is now a community project, and not directly used by LexiFi.


flexdll implements a dlopen-like API for Windows, which allowed OCaml Windows port to support Dynlink in native code and to come with a simpler build system.

The maintainance of flexdll is now largely assumed by David Allsopp.


csml enables writing hybric OCaml/.NET applications, including using .NET libraries (such as Winforms) from applications mostly written in OCaml, providing .NET interface to OCaml components.

We use this library to implement the UI of our native Windows front-end.


dead_code_analyzer scans an OCaml code base and report globally-unused declarations. It is a great addition to warnings which only reports declarations which are unused within their own module and are not exported by its interface.