My Tarides contract is progressing nicely, and we now have Opam setting an environment built from Nix to provide external dependencies. I’ve also indexed all of Nixpkgs history in order to do version solving across it.
Spoke to Roy about a possible Part II project, and wrote another proposal on an ‘OCaml Wayland Compositor’; something I’ve been meaning to do for a while but have yet to find the time.
Wayland 1 is a communications protocol for next-generation display servers used in Unix-like systems which has been adopted as the default display server by Linux distributions including Fedora with KDE, and Ubuntu and Debian with GNOME. It aims to replace the venerable X display server with a modern alternative. X leaves logic such as window management to application software, which has allowed the proliferation of different approaches. Wayland, however, centralises this logic in the ‘compositor’, which assumes both display server and window manager roles 2.
Libraries such as wlroots, libweston, and ‘small Wayland compositor’, exist to provide a basis on which to build a Wayland compositor. Much of the Wayland ecosystem is written in C, but modern memory-safe, type-safe, composable systems programming languages like OCaml offer tempting alternatives. This project proposes writing a Wayland compositor in OCaml, which opens up interesting opportunities for writing custom window management logic similar to how xmonad does for X 3 rather than relying on IPC mechanisms used in state-of-the-art systems 4.
This project is suitable for an ambitious student with a keen interest in graphics, communication protocols, and operating systems. Starting points include completing OCaml wlroots bindings 5 enough to implement an OCaml version of the tinywl compositor 6, and the pure OCaml implementation of the Wayland protocol 7.