I’m not sure if this is that close to the typical uses of OCaml, but posting this here just in case anyone was interested in another end-user facing application using LablGtk.
LibreRef is a free as in freedom digital referencing tool for artists.
It’s written in OCaml using LablGtk and Cairo to implement the GUI.
A picture is worth a thousand words, so before I continue, here are a few examples of it in action:
Overall, getting LablGtk to work was fairly straightforward, although the documentation was a bit lacking (although the same might be said of Gtk itself).
I was able to piece together the correct uses of most of the API calls by relying on either the examples from the repository or by translating snippets of code from online back into LablGtk.
As for deploying it as an application, I found the AppImage & LinuxDeploy toolchain to work well with the resulting binary (admittedly I’ve only tested it with two devices so far), and it meant that I could publish the program without having to ask people to setup the full OCaml & Opam toolchain, which would probably be a large ask.
As for the implementation, I think it was fairly elegant (if I say so myself ), although I may have gone overboard with functors (see this higher-order functor in the GUI interface: gui.mli · master · Kiran Gopinathan / libre-ref · GitLab) and some aspects of the separation of concerns weren’t so well established.