I hope you are well.
There are teachers who ask me if we can use the OCaml programming language with the Virtual Programming Lab (VPL) module of Moodle.
First you must install Ocaml and a build system for Ocaml (On Ubuntu the package "ocaml-native-compilers" provides ocamlc.opt, but I can't figure out which Ubuntu package provides dune--I use Debian but my VPL server is Ubuntu).
Once you have Ocaml and your build tools installed, you can just edit vpl_run.sh with something like#!/bin/sh
This is just to get you started. You should do this with a dune file, which you can save in the VPL Activity, I think. You can read the examples for other languages in the VPL source code.